]> gcc.gnu.org Git - gcc.git/commitdiff
utils.c (create_param_decl): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_pr...
authorKazu Hirata <kazu@cs.umass.edu>
Thu, 5 Feb 2004 22:07:33 +0000 (22:07 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Thu, 5 Feb 2004 22:07:33 +0000 (22:07 +0000)
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

gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/utils.c
gcc/config/cris/cris.h
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/java/ChangeLog
gcc/java/Make-lang.in
gcc/java/decl.c
gcc/java/expr.c
gcc/java/parse.y

index ed731d5c92130790e8aeb7941b438242f215e776..7e920238929995a9181d20fb67b388002bc2d264 100644 (file)
@@ -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
index af2e8e4dc50c63ca3b6c11850144359d6cbca4a4..3c3cb1536882a12baeb334e2caf2f084d87ed1ae 100644 (file)
@@ -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,
index dbc71a44e08a7fb9d4ac200523f596eef5443049..94176917836e07fb9a18b9dcb88a059c3677ae1c 100644 (file)
@@ -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;
index 76a4e763855f140dcfc410a30027271e1cc47754..a999e04b6bd8f0bc15096d63e397bb67c181d9fe 100644 (file)
@@ -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) \
index dc1a92d617dfd7ec08eb5022967e29c1394a2a58..4d028a3cac46c3c1e5ce176a0de91f5d40881291 100644 (file)
@@ -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
index e6eded59addb25a84a5f7a18ee4925b7956ac620..15382dcb1b893eb1716b70f3b96d4e2c8667e5eb 100644 (file)
@@ -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),
index 12563e19ca4d79a8be4df9f8863f22aa4e5e3a8f..714cd764196a91ea7163d5adc0fe117251c5b4c3 100644 (file)
@@ -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.
index fa981193ff3bbf37a76d3812187c577fc3c9905d..356ac4b822544f9b68cc25d8c7005ece442d3c27 100644 (file)
@@ -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) \
index 391fe6a89e22f2db14103a9902626ae150b9c223..e0dd852927e29aed1364d92a89cb77e103113477 100644 (file)
@@ -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;
index 53aa45b272afd97a82d848069427bfa4d217f293..a4356eb3e4841f631be43320849478015356d10c 100644 (file)
@@ -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);
index 620973745b973d4d38333e3fa89ee58e0c41ada1..93755ea84aece3e3db380ccc68cb5be989111365 100644 (file)
@@ -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;
This page took 0.107444 seconds and 5 git commands to generate.