diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-01 18:44:05 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-01 18:44:05 +0000 |
commit | 8e2cc24f01e1f791accad81682738355bcd1a088 (patch) | |
tree | 5c2dc4394623eeb9dbdbf55b03708825c8d72454 /gcc/config/m32c/m32c.c | |
parent | 72982b1f94559be6092ff5e4bdff195353a5e029 (diff) | |
download | gcc-8e2cc24f01e1f791accad81682738355bcd1a088.tar.gz |
* config/m32c/m32c-protos.h (m32c_function_arg): Delete.
(m32c_function_arg_advance): Delete.
* config/m32c/m32c.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/m32c/m32c.c (m32c_function_arg): Make static. Adjust
comments. Take a const_tree and a bool. Declare.
(m32c_function_arg_advance): Likewise.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163742 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m32c/m32c.c')
-rw-r--r-- | gcc/config/m32c/m32c.c | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index 42d343a0bb0..7be6fce6436 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -73,8 +73,12 @@ static bool m32c_fixed_condition_code_regs (unsigned int *, unsigned int *); static struct machine_function *m32c_init_machine_status (void); static void m32c_insert_attributes (tree, tree *); static bool m32c_legitimate_address_p (enum machine_mode, rtx, bool); +static rtx m32_function_arg (CUMULATIVE_ARGS *, enum machine_mode + const_tree, bool); static bool m32c_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode, const_tree, bool); +static void m32c_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, + const_tree, bool); static bool m32c_promote_prototypes (const_tree); static int m32c_pushm_popm (Push_Pop_Type); static bool m32c_strict_argument_naming (CUMULATIVE_ARGS *); @@ -1453,10 +1457,11 @@ m32c_push_rounding (int n) /* Passing Arguments in Registers */ -/* Implements FUNCTION_ARG. Arguments are passed partly in registers, - partly on stack. If our function returns a struct, a pointer to a - buffer for it is at the top of the stack (last thing pushed). The - first few real arguments may be in registers as follows: +/* Implements TARGET_FUNCTION_ARG. Arguments are passed partly in + registers, partly on stack. If our function returns a struct, a + pointer to a buffer for it is at the top of the stack (last thing + pushed). The first few real arguments may be in registers as + follows: R8C/M16C: arg1 in r1 if it's QI or HI (else it's pushed on stack) arg2 in r2 if it's HI (else pushed on stack) @@ -1469,9 +1474,11 @@ m32c_push_rounding (int n) Note that when arg1 doesn't fit in r1, arg2 may still be passed in r2 if it fits. */ -rtx +#undef TARGET_FUNCTION_ARG +#define TARGET_FUNCTION_ARG m32c_function_arg +static rtx m32c_function_arg (CUMULATIVE_ARGS * ca, - enum machine_mode mode, tree type, int named) + enum machine_mode mode, const_tree type, bool named) { /* Can return a reg, parallel, or 0 for stack */ rtx rv = NULL_RTX; @@ -1544,15 +1551,17 @@ m32c_init_cumulative_args (CUMULATIVE_ARGS * ca, ca->parm_num = 1; } -/* Implements FUNCTION_ARG_ADVANCE. force_mem is set for functions - returning structures, so we always reset that. Otherwise, we only - need to know the sequence number of the argument to know what to do - with it. */ -void +/* Implements TARGET_FUNCTION_ARG_ADVANCE. force_mem is set for + functions returning structures, so we always reset that. Otherwise, + we only need to know the sequence number of the argument to know what + to do with it. */ +#undef TARGET_FUNCTION_ARG_ADVANCE +#define TARGET_FUNCTION_ARG_ADVANCE m32c_function_arg_advance +static void m32c_function_arg_advance (CUMULATIVE_ARGS * ca, enum machine_mode mode ATTRIBUTE_UNUSED, - tree type ATTRIBUTE_UNUSED, - int named ATTRIBUTE_UNUSED) + const_tree type ATTRIBUTE_UNUSED, + bool named ATTRIBUTE_UNUSED) { if (ca->force_mem) ca->force_mem = 0; |