summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-29 01:40:48 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-29 01:40:48 +0000
commit322f231af105e7bc06f4bb06b26fae5f9afecadb (patch)
tree88d1f8e2c1c7475df89bdd1a163ab2817fa1efb7
parent8fcc11183b0b222f366610e42bad787ffd9b7b5d (diff)
downloadgcc-322f231af105e7bc06f4bb06b26fae5f9afecadb.tar.gz
* config/fr30/fr30.c (TARGET_PROMOTE_PROTOTYPES): New.
(fr30_setup_incoming_varargs): Don't use STRICT_ARGUMENT_NAMING. * config/fr30/fr30.h (PROMOTE_PROTOTYPES): Remove. (STRICT_ARGUMENT_NAMING): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76830 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/fr30/fr30.c17
-rw-r--r--gcc/config/fr30/fr30.h20
3 files changed, 21 insertions, 24 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index aad6684c79d..dec51aae885 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,13 @@
2004-01-28 Kazu Hirata <kazu@cs.umass.edu>
+ * config/fr30/fr30.c (TARGET_PROMOTE_PROTOTYPES): New.
+ (fr30_setup_incoming_varargs): Don't use
+ STRICT_ARGUMENT_NAMING.
+ * config/fr30/fr30.h (PROMOTE_PROTOTYPES): Remove.
+ (STRICT_ARGUMENT_NAMING): Likewise.
+
+2004-01-28 Kazu Hirata <kazu@cs.umass.edu>
+
* config/frv/frv-protos.h: Remove the prototype for
frv_expand_builtin_saveregs.
* config/frv/frv.c (TARGET_STRUCT_VALUE_RTX): Likewise.
diff --git a/gcc/config/fr30/fr30.c b/gcc/config/fr30/fr30.c
index c702d0bbe28..a420fb19859 100644
--- a/gcc/config/fr30/fr30.c
+++ b/gcc/config/fr30/fr30.c
@@ -1,5 +1,6 @@
/* FR30 specific functions.
- Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004
+ Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of GCC.
@@ -148,6 +149,9 @@ static rtx fr30_pass_by_value (tree, tree);
#undef TARGET_ASM_ALIGNED_SI_OP
#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
+#undef TARGET_PROMOTE_PROTOTYPES
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Returns the number of bytes offset between FROM_REG and TO_REG
@@ -417,11 +421,12 @@ fr30_setup_incoming_varargs (CUMULATIVE_ARGS arg_regs_used_so_far,
if (mode == BLKmode)
abort ();
-#if STRICT_ARGUMENT_NAMING
- /* If STRICT_ARGUMENT_NAMING is true then the last named
- arg must not be treated as an anonymous arg. */
- arg_regs_used_so_far += fr30_num_arg_regs (int_mode, type);
-#endif
+ /* ??? This run-time test as well as the code inside the if
+ statement is probably unnecessary. */
+ if (targetm.calls.strict_argument_naming (&arg_regs_used_so_far))
+ /* If TARGET_STRICT_ARGUMENT_NAMING returns true, then the last named
+ arg must not be treated as an anonymous arg. */
+ arg_regs_used_so_far += fr30_num_arg_regs (int_mode, type);
size = FR30_NUM_ARG_REGS - arg_regs_used_so_far;
diff --git a/gcc/config/fr30/fr30.h b/gcc/config/fr30/fr30.h
index 845b4f1e111..8b71e3f68e8 100644
--- a/gcc/config/fr30/fr30.h
+++ b/gcc/config/fr30/fr30.h
@@ -1,7 +1,8 @@
/*{{{ Comment. */
/* Definitions of FR30 target.
- Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004
+ Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of GCC.
@@ -602,12 +603,6 @@ enum reg_class
/*}}}*/
/*{{{ Passing Function Arguments on the Stack. */
-/* Define this macro if an argument declared in a prototype as an integral type
- smaller than `int' should actually be passed as an `int'. In addition to
- avoiding errors in certain cases of mismatch, it also makes for better code
- on certain machines. */
-#define PROMOTE_PROTOTYPES 1
-
/* If defined, the maximum amount of space required for outgoing arguments will
be computed and placed into the variable
`current_function_outgoing_args_size'. No space will be pushed onto the
@@ -903,17 +898,6 @@ enum reg_class
if (! SECOND_TIME) \
fr30_setup_incoming_varargs (ARGS_SO_FAR, MODE, TYPE, & PRETEND_ARGS_SIZE)
-/* Define this macro if the location where a function argument is passed
- depends on whether or not it is a named argument.
-
- This macro controls how the NAMED argument to `FUNCTION_ARG' is set for
- varargs and stdarg functions. With this macro defined, the NAMED argument
- is always true for named arguments, and false for unnamed arguments. If
- this is not defined, but `SETUP_INCOMING_VARARGS' is defined, then all
- arguments are treated as named. Otherwise, all named arguments except the
- last are treated as named. */
-#define STRICT_ARGUMENT_NAMING 0
-
/*}}}*/
/*{{{ Trampolines for Nested Functions. */