diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2004-02-05 22:07:33 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2004-02-05 22:07:33 +0000 |
commit | 136e64db5ea4eda85d7a9916d3ae9f4fa528b1e3 (patch) | |
tree | 37419ddcaadd888777ea3df662e86983cd2a9346 | |
parent | 839ee4bc570bf56df913d37a4fa3ab9fb6e5956e (diff) | |
download | gcc-136e64db5ea4eda85d7a9916d3ae9f4fa528b1e3.zip gcc-136e64db5ea4eda85d7a9916d3ae9f4fa528b1e3.tar.gz gcc-136e64db5ea4eda85d7a9916d3ae9f4fa528b1e3.tar.bz2 |
utils.c (create_param_decl): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes.
ada/
* ada/utils.c (create_param_decl): Replace PROMOTE_PROTOTYPES
with targetm.calls.promote_prototypes.
gcc/
* config/cris/cris.h: Replace PROMOTE_PROTOTYPES with
TARGET_PROMOTE_PROTOTYPES.
cp/
* call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
targetm.calls.promote_prototypes.
java/
* Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
Depend on target.h.
* decl.c: Include target.h.
(start_java_method): Replace PROMOTE_PROTOTYPES with
targetm.calls.promote_prototypes.
* expr.c: Include target.h.
(pop_arguments): Replace PROMOTE_PROTOTYPES with
targetm.calls.promote_prototypes.
* parse.y: Include target.h.
(start_complete_expand_method): Replace PROMOTE_PROTOTYPES
with targetm.calls.promote_prototypes.
From-SVN: r77345
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/utils.c | 9 | ||||
-rw-r--r-- | gcc/config/cris/cris.h | 2 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/call.c | 4 | ||||
-rw-r--r-- | gcc/java/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/java/Make-lang.in | 7 | ||||
-rw-r--r-- | gcc/java/decl.c | 3 | ||||
-rw-r--r-- | gcc/java/expr.c | 3 | ||||
-rw-r--r-- | gcc/java/parse.y | 3 |
11 files changed, 46 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ed731d5c..7e92023 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-02-05 Kazu Hirata <kazu@cs.umass.edu> + + * config/cris/cris.h: Replace PROMOTE_PROTOTYPES with + TARGET_PROMOTE_PROTOTYPES. + 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> PR middle-end/13750 diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index af2e8e4..3c3cb15 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2004-02-05 Kazu Hirata <kazu@cs.umass.edu> + + * ada/utils.c (create_param_decl): Replace PROMOTE_PROTOTYPES + with targetm.calls.promote_prototypes. + 2004-02-04 Robert Dewar <dewar@gnat.com> * 5gtasinf.adb, 5gtasinf.ads, 5gtaprop.adb, ali.adb, diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index dbc71a4..9417691 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -1540,11 +1540,11 @@ create_param_decl (tree param_name, tree param_type, int readonly) { tree param_decl = build_decl (PARM_DECL, param_name, param_type); - /* Honor the PROMOTE_PROTOTYPES target macro, as not doing so can + /* Honor targetm.calls.promote_prototypes(), as not doing so can lead to various ABI violations. */ -#ifdef PROMOTE_PROTOTYPES - if ((TREE_CODE (param_type) == INTEGER_TYPE - || TREE_CODE (param_type) == ENUMERAL_TYPE) + if (targetm.calls.promote_prototypes (param_type) + && (TREE_CODE (param_type) == INTEGER_TYPE + || TREE_CODE (param_type) == ENUMERAL_TYPE) && TYPE_PRECISION (param_type) < TYPE_PRECISION (integer_type_node)) { /* We have to be careful about biased types here. Make a subtype @@ -1562,7 +1562,6 @@ create_param_decl (tree param_name, tree param_type, int readonly) else param_type = integer_type_node; } -#endif DECL_ARG_TYPE (param_decl) = param_type; DECL_ARG_TYPE_AS_WRITTEN (param_decl) = param_type; diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h index 76a4e76..a999e04 100644 --- a/gcc/config/cris/cris.h +++ b/gcc/config/cris/cris.h @@ -479,7 +479,7 @@ extern int target_flags; /* A combination of defining PROMOTE_MODE, TARGET_PROMOTE_FUNCTION_ARGS that always returns true, - PROMOTE_FOR_CALL_ONLY and *not* defining PROMOTE_PROTOTYPES gives the + PROMOTE_FOR_CALL_ONLY and *not* defining TARGET_PROMOTE_PROTOTYPES gives the best code size and speed for gcc, ipps and products in gcc-2.7.2. */ #define CRIS_PROMOTED_MODE(MODE, UNSIGNEDP, TYPE) \ (GET_MODE_CLASS (MODE) == MODE_INT && GET_MODE_SIZE (MODE) < 4) \ diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dc1a92d..4d028a3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2004-02-05 Kazu Hirata <kazu@cs.umass.edu> + + * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with + targetm.calls.promote_prototypes. + 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> PR middle-end/13750 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index e6eded5..15382dc 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -4245,7 +4245,7 @@ type_passed_as (tree type) /* Pass classes with copy ctors by invisible reference. */ if (TREE_ADDRESSABLE (type)) type = build_reference_type (type); - else if (PROMOTE_PROTOTYPES + else if (targetm.calls.promote_prototypes (type) && INTEGRAL_TYPE_P (type) && COMPLETE_TYPE_P (type) && INT_CST_LT_UNSIGNED (TYPE_SIZE (type), @@ -4265,7 +4265,7 @@ convert_for_arg_passing (tree type, tree val) /* Pass classes with copy ctors by invisible reference. */ else if (TREE_ADDRESSABLE (type)) val = build1 (ADDR_EXPR, build_reference_type (type), val); - else if (PROMOTE_PROTOTYPES + else if (targetm.calls.promote_prototypes (type) && INTEGRAL_TYPE_P (type) && COMPLETE_TYPE_P (type) && INT_CST_LT_UNSIGNED (TYPE_SIZE (type), diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 12563e1..714cd76 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,17 @@ +2004-02-05 Kazu Hirata <kazu@cs.umass.edu> + + * Make-lang.in (java/decl.o, java/expr.o, java/parse.o): + Depend on target.h. + * decl.c: Include target.h. + (start_java_method): Replace PROMOTE_PROTOTYPES with + targetm.calls.promote_prototypes. + * expr.c: Include target.h. + (pop_arguments): Replace PROMOTE_PROTOTYPES with + targetm.calls.promote_prototypes. + * parse.y: Include target.h. + (start_complete_expand_method): Replace PROMOTE_PROTOTYPES + with targetm.calls.promote_prototypes. + 2004-02-04 Kazu Hirata <kazu@cs.umass.edu> * typeck.c: Update copyright. diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in index fa98119..356ac4b 100644 --- a/gcc/java/Make-lang.in +++ b/gcc/java/Make-lang.in @@ -292,14 +292,15 @@ java/constants.o: java/constants.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) gt-java-constants.h java/decl.o: java/decl.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) java/jcf.h \ toplev.h flags.h $(SYSTEM_H) coretypes.h $(TM_H) function.h expr.h \ - libfuncs.h except.h java/java-except.h $(GGC_H) real.h gt-java-decl.h + libfuncs.h except.h java/java-except.h $(GGC_H) real.h gt-java-decl.h \ + target.h java/except.o: java/except.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \ $(RTL_H) java/javaop.h java/java-opcodes.h except.h java/java-except.h \ toplev.h $(SYSTEM_H) coretypes.h $(TM_H) function.h java/expr.o: java/expr.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \ $(RTL_H) $(EXPR_H) java/javaop.h java/java-opcodes.h except.h \ java/java-except.h java/java-except.h java/parse.h toplev.h \ - $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) gt-java-expr.h + $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) gt-java-expr.h target.h java/jcf-depend.o: java/jcf-depend.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) java/jcf.h java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) flags.h \ @@ -336,7 +337,7 @@ java/parse-scan.o: java/parse-scan.c $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TM_H) toplev.h $(JAVA_LEX_C) java/parse.h java/lex.h input.h java/parse.o: java/parse.c java/jcf-reader.c $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TM_H) function.h $(JAVA_TREE_H) $(JAVA_LEX_C) java/parse.h \ - java/lex.h input.h $(GGC_H) debug.h gt-java-parse.h gtype-java.h + java/lex.h input.h $(GGC_H) debug.h gt-java-parse.h gtype-java.h target.h # jcf-io.o needs $(ZLIBINC) added to cflags. java/jcf-io.o: java/jcf-io.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 391fe6a..e0dd852 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -45,6 +45,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "ggc.h" #include "timevar.h" #include "tree-inline.h" +#include "target.h" #if defined (DEBUG_JAVA_BINDING_LEVELS) extern void indent (void); @@ -1758,7 +1759,7 @@ start_java_method (tree fndecl) parm_decl = build_decl (PARM_DECL, parm_name, parm_type); DECL_CONTEXT (parm_decl) = fndecl; - if (PROMOTE_PROTOTYPES + if (targetm.calls.promote_prototypes (parm_type) && TYPE_PRECISION (parm_type) < TYPE_PRECISION (integer_type_node) && INTEGRAL_TYPE_P (parm_type)) parm_type = integer_type_node; diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 53aa45b..a4356eb 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -43,6 +43,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "toplev.h" #include "except.h" #include "ggc.h" +#include "target.h" static void flush_quick_stack (void); static void push_value (tree); @@ -1674,7 +1675,7 @@ pop_arguments (tree arg_types) tree tail = pop_arguments (TREE_CHAIN (arg_types)); tree type = TREE_VALUE (arg_types); tree arg = pop_value (type); - if (PROMOTE_PROTOTYPES + if (targetm.calls.promote_prototypes (type) && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node) && INTEGRAL_TYPE_P (type)) arg = convert (integer_type_node, arg); diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 6209737..93755ea 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -72,6 +72,7 @@ definitions and other extensions. */ #include "debug.h" #include "tree-inline.h" #include "cgraph.h" +#include "target.h" /* Local function prototypes */ static char *java_accstring_lookup (int); @@ -7990,7 +7991,7 @@ start_complete_expand_method (tree mdecl) /* TREE_CHAIN (tem) will change after pushdecl. */ tree next = TREE_CHAIN (tem); tree type = TREE_TYPE (tem); - if (PROMOTE_PROTOTYPES + if (targetm.calls.promote_prototypes (type) && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node) && INTEGRAL_TYPE_P (type)) type = integer_type_node; |