arm.c (TARGET_PROMOTE_FUNCTION_ARGS): New.
authorKazu Hirata <kazu@cs.umass.edu>
Mon, 26 Jan 2004 15:40:04 +0000 (15:40 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Mon, 26 Jan 2004 15:40:04 +0000 (15:40 +0000)
* config/arm/arm.c (TARGET_PROMOTE_FUNCTION_ARGS): New.
(TARGET_PROMOTE_PROTOTYPES): Likewise.
(TARGET_STRUCT_VALUE_RTX): Likewise.
(arm_struct_value_rtx): Likewise.
* config/arm/arm.h (PROMOTE_FUNCTION_ARGS): Remove.
(STRUCT_VALUE): Likewise.
(STRUCT_VALUE_REGNUM): Likewise.
(PROMOTE_PROTOTYPES): Likewise.

From-SVN: r76636

gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.h

index 757afc59cdf7042de46f577f2f4bc9af12f4629d..60c03f17d299c5df9b4e5c209bc6d997b8accbbc 100644 (file)
@@ -1,3 +1,14 @@
+2004-01-26  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/arm/arm.c (TARGET_PROMOTE_FUNCTION_ARGS): New.
+       (TARGET_PROMOTE_PROTOTYPES): Likewise.
+       (TARGET_STRUCT_VALUE_RTX): Likewise.
+       (arm_struct_value_rtx): Likewise.
+       * config/arm/arm.h (PROMOTE_FUNCTION_ARGS): Remove.
+       (STRUCT_VALUE): Likewise.
+       (STRUCT_VALUE_REGNUM): Likewise.
+       (PROMOTE_PROTOTYPES): Likewise.
+
 2004-01-26  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/ia64/ia64-protos.h: Remove the prototype for
index 5e7bbe7753e72e553299f7c40b9af886dc4204e7..692432b3bdf7a9a696c39380a56bd79b56afff57 100644 (file)
@@ -150,6 +150,7 @@ static void aof_dump_pic_table (FILE *);
 static void aof_file_start (void);
 static void aof_file_end (void);
 #endif
+static rtx arm_struct_value_rtx (tree, int);
 
 \f
 /* Initialize the GCC target structure.  */
@@ -233,6 +234,14 @@ static void aof_file_end (void);
 #undef  TARGET_EXPAND_BUILTIN
 #define TARGET_EXPAND_BUILTIN arm_expand_builtin
 
+#undef TARGET_PROMOTE_FUNCTION_ARGS
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#undef TARGET_PROMOTE_PROTOTYPES
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+
+#undef TARGET_STRUCT_VALUE_RTX
+#define TARGET_STRUCT_VALUE_RTX arm_struct_value_rtx
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Obstack for minipool constant handling.  */
@@ -13322,3 +13331,22 @@ arm_output_load_gr (rtx *operands)
 
   return "";
 }
+
+static rtx
+arm_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
+                     int incoming ATTRIBUTE_UNUSED)
+{
+#if 0
+  /* FIXME: The ARM backend has special code to handle structure
+        returns, and will reserve its own hidden first argument.  So
+        if this macro is enabled a *second* hidden argument will be
+        reserved, which will break binary compatibility with old
+        toolchains and also thunk handling.  One day this should be
+        fixed.  */
+  return 0;
+#else
+  /* Register in which address to store a structure value
+     is passed to a function.  */
+  return gen_rtx_REG (Pmode, ARG_REGISTER (1));
+#endif
+}
index 40c26c9b39dc9fef305732f0455e17909df389f1..d169f180f817d8dd5b0daf76d35529733165c7d2 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler, for ARM.
    Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003 Free Software Foundation, Inc.
+   2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
    and Martin Simmons (@harleqn.co.uk).
    More major hacks by Richard Earnshaw (rearnsha@arm.com)
@@ -709,11 +709,6 @@ extern int arm_is_6_or_7;
       (MODE) = SImode;                         \
     }
 
-/* Define this macro if the promotion described by `PROMOTE_MODE'
-   should also be done for outgoing function arguments.  */
-/* This is required to ensure that push insns always push a word.  */
-#define PROMOTE_FUNCTION_ARGS
-
 /* Define this if most significant bit is lowest numbered
    in instructions that operate on numbered bit-fields.  */
 #define BITS_BIG_ENDIAN  0
@@ -1051,20 +1046,6 @@ extern const char * structure_size_string;
 /* Return the register number of the N'th (integer) argument.  */
 #define ARG_REGISTER(N)        (N - 1)
 
-#if 0 /* FIXME: The ARM backend has special code to handle structure
-        returns, and will reserve its own hidden first argument.  So
-        if this macro is enabled a *second* hidden argument will be
-        reserved, which will break binary compatibility with old
-        toolchains and also thunk handling.  One day this should be
-        fixed.  */
-/* RTX for structure returns.  NULL means use a hidden first argument.  */
-#define STRUCT_VALUE           0
-#else
-/* Register in which address to store a structure value
-   is passed to a function.  */
-#define STRUCT_VALUE_REGNUM    ARG_REGISTER (1)
-#endif
-
 /* Specify the registers used for certain standard purposes.
    The values of these macros are register numbers.  */
 
@@ -2349,9 +2330,6 @@ do {                                                      \
 /* Calling from registers is a massive pain.  */
 #define NO_FUNCTION_CSE 1
 
-/* Chars and shorts should be passed as ints.  */
-#define PROMOTE_PROTOTYPES 1
-
 /* The machine modes of pointers and functions */
 #define Pmode  SImode
 #define FUNCTION_MODE  Pmode