aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2004-01-26 15:40:04 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2004-01-26 15:40:04 +0000
commitf9ba5949c966ee7267016544115addb761a63b62 (patch)
tree09b27dba019c2d92e6e2c6f7cd9bc63b011e1ca4 /gcc
parent351a758bd93d01a6782e922b3c094121ada93a0b (diff)
downloadgcc-f9ba5949c966ee7267016544115addb761a63b62.zip
gcc-f9ba5949c966ee7267016544115addb761a63b62.tar.gz
gcc-f9ba5949c966ee7267016544115addb761a63b62.tar.bz2
arm.c (TARGET_PROMOTE_FUNCTION_ARGS): New.
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/arm/arm.c28
-rw-r--r--gcc/config/arm/arm.h24
3 files changed, 40 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 757afc5..60c03f1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,16 @@
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
ia64_setup_incoming_varargs and ia64_return_in_memory.
* config/ia64/ia64.c (TARGET_STRUCT_VALUE_RTX): New.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 5e7bbe7..692432b 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -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);
/* 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;
/* 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
+}
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 40c26c9..d169f18 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -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