aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/arc')
-rw-r--r--gcc/config/arc/arc.c12
-rw-r--r--gcc/config/arc/arc.h12
2 files changed, 7 insertions, 17 deletions
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 9ea6df7a027..63767dd5f16 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -802,12 +802,8 @@ arc_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl)
if (mode == BLKmode)
abort ();
- /* We must treat `__builtin_va_alist' as an anonymous arg. */
- if (current_function_varargs)
- first_anon_arg = *cum;
- else
- first_anon_arg = *cum + ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1)
- / UNITS_PER_WORD);
+ first_anon_arg = *cum + ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1)
+ / UNITS_PER_WORD);
if (first_anon_arg < MAX_ARC_PARM_REGS && !no_rtl)
{
@@ -2266,7 +2262,7 @@ arc_ccfsm_record_branch_deleted ()
void
arc_va_start (stdarg_p, valist, nextarg)
- int stdarg_p;
+ int stdarg_p ATTRIBUTE_UNUSED;
tree valist;
rtx nextarg;
{
@@ -2275,7 +2271,7 @@ arc_va_start (stdarg_p, valist, nextarg)
&& (current_function_args_info & 1))
nextarg = plus_constant (nextarg, UNITS_PER_WORD);
- std_expand_builtin_va_start (stdarg_p, valist, nextarg);
+ std_expand_builtin_va_start (1, valist, nextarg);
}
rtx
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index 1390d6bc2a1..db8b8d452fd 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -665,15 +665,9 @@ extern enum reg_class arc_regno_reg_class[FIRST_PSEUDO_REGISTER];
a reg. This includes arguments that have to be passed by reference as the
pointer to them is passed in a reg if one is available (and that is what
we're given).
- When passing arguments NAMED is always 1. When receiving arguments NAMED
- is 1 for each argument except the last in a stdarg/varargs function. In
- a stdarg function we want to treat the last named arg as named. In a
- varargs function we want to treat the last named arg (which is
- `__builtin_va_alist') as unnamed.
This macro is only used in this file. */
-#define PASS_IN_REG_P(CUM, MODE, TYPE, NAMED) \
-((!current_function_varargs || (NAMED)) \
- && (CUM) < MAX_ARC_PARM_REGS \
+#define PASS_IN_REG_P(CUM, MODE, TYPE) \
+((CUM) < MAX_ARC_PARM_REGS \
&& ((ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)) \
+ ROUND_ADVANCE_ARG ((MODE), (TYPE)) \
<= MAX_ARC_PARM_REGS)))
@@ -693,7 +687,7 @@ extern enum reg_class arc_regno_reg_class[FIRST_PSEUDO_REGISTER];
/* On the ARC the first MAX_ARC_PARM_REGS args are normally in registers
and the rest are pushed. */
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
-(PASS_IN_REG_P ((CUM), (MODE), (TYPE), (NAMED)) \
+(PASS_IN_REG_P ((CUM), (MODE), (TYPE)) \
? gen_rtx_REG ((MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE))) \
: 0)