From: Alan Lawrence Date: Fri, 5 Sep 2014 10:21:46 +0000 (+0000) Subject: [PATCH AArch64] Remove varargs from aarch64_simd_expand_args X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8d3d350af830aeced6d9198cd6ce8c826ddcd0c4;p=gcc.git [PATCH AArch64] Remove varargs from aarch64_simd_expand_args * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Replace varargs with pointer parameter. (aarch64_simd_expand_builtin): pass pointer into previous. From-SVN: r214945 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c0e099ca341..9bf532b9a9e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-09-05 Alan Lawrence + + * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Replace + varargs with pointer parameter. + (aarch64_simd_expand_builtin): pass pointer into previous. + 2014-09-05 Kyrylo Tkachov * config/arm/cortex-a53.md (cortex_a53_alu_shift): Add alu_ext, diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c index 5217f4a5f39..5e2f85edc3d 100644 --- a/gcc/config/aarch64/aarch64-builtins.c +++ b/gcc/config/aarch64/aarch64-builtins.c @@ -862,9 +862,8 @@ typedef enum static rtx aarch64_simd_expand_args (rtx target, int icode, int have_retval, - tree exp, ...) + tree exp, builtin_simd_arg *args) { - va_list ap; rtx pat; tree arg[SIMD_MAX_BUILTIN_ARGS]; rtx op[SIMD_MAX_BUILTIN_ARGS]; @@ -878,11 +877,9 @@ aarch64_simd_expand_args (rtx target, int icode, int have_retval, || !(*insn_data[icode].operand[0].predicate) (target, tmode))) target = gen_reg_rtx (tmode); - va_start (ap, exp); - for (;;) { - builtin_simd_arg thisarg = (builtin_simd_arg) va_arg (ap, int); + builtin_simd_arg thisarg = args[argc]; if (thisarg == SIMD_ARG_STOP) break; @@ -918,8 +915,6 @@ aarch64_simd_expand_args (rtx target, int icode, int have_retval, } } - va_end (ap); - if (have_retval) switch (argc) { @@ -1033,12 +1028,7 @@ aarch64_simd_expand_builtin (int fcode, tree exp, rtx target) /* The interface to aarch64_simd_expand_args expects a 0 if the function is void, and a 1 if it is not. */ return aarch64_simd_expand_args - (target, icode, !is_void, exp, - args[1], - args[2], - args[3], - args[4], - SIMD_ARG_STOP); + (target, icode, !is_void, exp, &args[1]); } rtx