diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-28 19:45:32 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-28 19:45:32 +0000 |
commit | 6a16a3b19bf552f3fca911688143c6db636ded1f (patch) | |
tree | 7c3bc5cdc1e196cbd160499eb643f05b72258049 | |
parent | 415ca0cbe0befc4774c13214e515136d45c565bf (diff) | |
download | ppe42-gcc-6a16a3b19bf552f3fca911688143c6db636ded1f.tar.gz ppe42-gcc-6a16a3b19bf552f3fca911688143c6db636ded1f.zip |
* config/frv/frv-protos.h (frv_function_arg): Delete.
(frv_function_arg_advance): Delete.
* config/frv/frv.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/frv/frv.c (frv_function_arg): Rename to...
(frv_function_arg_1): Make static. Take const_tree and bool
arguments.
(frv_function_arg, frv_function_incoming_arg): New functions.
(frv_function_arg_advance): Make static. Take a const_tree and
a bool.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_INCOMING_ARG): Define.
(TARGET_FUNCTION_ARG_ADVANCE): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166033 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/config/frv/frv-protos.h | 7 | ||||
-rw-r--r-- | gcc/config/frv/frv.c | 42 | ||||
-rw-r--r-- | gcc/config/frv/frv.h | 28 |
4 files changed, 47 insertions, 44 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a6a55795aa..de9a4758dc2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2010-10-28 Nathan Froyd <froydnj@codesourcery.com> + + * config/frv/frv-protos.h (frv_function_arg): Delete. + (frv_function_arg_advance): Delete. + * config/frv/frv.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete. + * config/frv/frv.c (frv_function_arg): Rename to... + (frv_function_arg_1): Make static. Take const_tree and bool + arguments. + (frv_function_arg, frv_function_incoming_arg): New functions. + (frv_function_arg_advance): Make static. Take a const_tree and + a bool. + (TARGET_FUNCTION_ARG, TARGET_FUNCTION_INCOMING_ARG): Define. + (TARGET_FUNCTION_ARG_ADVANCE): Define. + 2010-10-28 Uros Bizjak <ubizjak@gmail.com> PR target/46153 diff --git a/gcc/config/frv/frv-protos.h b/gcc/config/frv/frv-protos.h index 68c2a576a63..af9f1cdd7e2 100644 --- a/gcc/config/frv/frv-protos.h +++ b/gcc/config/frv/frv-protos.h @@ -53,13 +53,6 @@ extern void frv_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, int); extern int frv_function_arg_boundary (enum machine_mode, tree); -extern rtx frv_function_arg (CUMULATIVE_ARGS *, - enum machine_mode, - tree, int, int); - -extern void frv_function_arg_advance (CUMULATIVE_ARGS *, - enum machine_mode, - tree, int); extern bool frv_function_value_regno_p (const unsigned int); #endif /* TREE_CODE */ diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 4cbcfcac8a1..adc69117c4b 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -388,6 +388,12 @@ static rtx frv_struct_value_rtx (tree, int); static bool frv_must_pass_in_stack (enum machine_mode mode, const_tree type); static int frv_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode, tree, bool); +static rtx frv_function_arg (CUMULATIVE_ARGS *, enum machine_mode, + const_tree, bool); +static rtx frv_function_incoming_arg (CUMULATIVE_ARGS *, enum machine_mode, + const_tree, bool); +static void frv_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, + const_tree, bool); static void frv_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED; static reg_class_t frv_secondary_reload (bool, rtx, reg_class_t, @@ -486,6 +492,12 @@ static const struct default_options frv_option_optimization_table[] = #define TARGET_PASS_BY_REFERENCE hook_pass_by_reference_must_pass_in_stack #undef TARGET_ARG_PARTIAL_BYTES #define TARGET_ARG_PARTIAL_BYTES frv_arg_partial_bytes +#undef TARGET_FUNCTION_ARG +#define TARGET_FUNCTION_ARG frv_function_arg +#undef TARGET_FUNCTION_INCOMING_ARG +#define TARGET_FUNCTION_INCOMING_ARG frv_function_incoming_arg +#undef TARGET_FUNCTION_ARG_ADVANCE +#define TARGET_FUNCTION_ARG_ADVANCE frv_function_arg_advance #undef TARGET_EXPAND_BUILTIN_SAVEREGS #define TARGET_EXPAND_BUILTIN_SAVEREGS frv_expand_builtin_saveregs @@ -3190,12 +3202,10 @@ frv_function_arg_boundary (enum machine_mode mode ATTRIBUTE_UNUSED, return BITS_PER_WORD; } -rtx -frv_function_arg (CUMULATIVE_ARGS *cum, - enum machine_mode mode, - tree type ATTRIBUTE_UNUSED, - int named, - int incoming ATTRIBUTE_UNUSED) +static rtx +frv_function_arg_1 (const CUMULATIVE_ARGS *cum, enum machine_mode mode, + const_tree type ATTRIBUTE_UNUSED, bool named, + bool incoming ATTRIBUTE_UNUSED) { enum machine_mode xmode = (mode == BLKmode) ? SImode : mode; int arg_num = *cum; @@ -3229,6 +3239,20 @@ frv_function_arg (CUMULATIVE_ARGS *cum, return ret; } +static rtx +frv_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, + const_tree type, bool named) +{ + return frv_function_arg_1 (cum, mode, type, named, false); +} + +static rtx +frv_function_incoming_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, + const_tree type, bool named) +{ + return frv_function_arg_1 (cum, mode, type, named, true); +} + /* A C statement (sans semicolon) to update the summarizer variable CUM to advance past an argument in the argument list. The values MODE, TYPE and @@ -3239,11 +3263,11 @@ frv_function_arg (CUMULATIVE_ARGS *cum, the stack. The compiler knows how to track the amount of stack space used for arguments without any special help. */ -void +static void frv_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, - tree type ATTRIBUTE_UNUSED, - int named) + const_tree type ATTRIBUTE_UNUSED, + bool named) { enum machine_mode xmode = (mode == BLKmode) ? SImode : mode; int bytes = GET_MODE_SIZE (xmode); diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h index 99e66434a89..fc0f2930dc3 100644 --- a/gcc/config/frv/frv.h +++ b/gcc/config/frv/frv.h @@ -1546,23 +1546,6 @@ typedef struct frv_stack { #define FRV_NUM_ARG_REGS 6 -#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ - frv_function_arg (&CUM, MODE, TYPE, NAMED, FALSE) - -/* Define this macro if the target machine has "register windows", so that the - register in which a function sees an arguments is not necessarily the same - as the one in which the caller passed the argument. - - For such machines, `FUNCTION_ARG' computes the register in which the caller - passes the value, and `FUNCTION_INCOMING_ARG' should be defined in a similar - fashion to tell the function being called where the arguments will arrive. - - If `FUNCTION_INCOMING_ARG' is not defined, `FUNCTION_ARG' serves both - purposes. */ - -#define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \ - frv_function_arg (&CUM, MODE, TYPE, NAMED, TRUE) - /* A C type for declaring a variable that is used as the first argument of `FUNCTION_ARG' and other related values. For some target machines, the type `int' suffices and can hold the number of bytes of argument so far. @@ -1605,17 +1588,6 @@ typedef struct frv_stack { #define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \ frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, NULL, TRUE) -/* A C statement (sans semicolon) to update the summarizer variable CUM to - advance past an argument in the argument list. The values MODE, TYPE and - NAMED describe that argument. Once this is done, the variable CUM is - suitable for analyzing the *following* argument with `FUNCTION_ARG', etc. - - This macro need not do anything if the argument in question was passed on - the stack. The compiler knows how to track the amount of stack space used - for arguments without any special help. */ -#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ - frv_function_arg_advance (&CUM, MODE, TYPE, NAMED) - /* If defined, a C expression that gives the alignment boundary, in bits, of an argument with the specified mode and type. If it is not defined, `PARM_BOUNDARY' is used for all arguments. */ |