From: yroux Date: Mon, 6 Oct 2014 14:30:11 +0000 (+0000) Subject: 2014-10-06 Charles Baylis X-Git-Tag: upstream/4.9.2~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3cb90323c6a4d7666177a674a82bc5aad1207a52;p=platform%2Fupstream%2Flinaro-gcc.git 2014-10-06 Charles Baylis Backport from trunk r214945. 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@215949 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog.linaro b/gcc/ChangeLog.linaro index 820e580..e8e203b 100644 --- a/gcc/ChangeLog.linaro +++ b/gcc/ChangeLog.linaro @@ -1,3 +1,12 @@ +2014-10-06 Charles Baylis + + Backport from trunk r214945. + 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-10-06 Kugan Vivekanandarajah Backport from trunk r214944. diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c index 699df38..3f7d50e 100644 --- a/gcc/config/aarch64/aarch64-builtins.c +++ b/gcc/config/aarch64/aarch64-builtins.c @@ -858,9 +858,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]; @@ -874,11 +873,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; @@ -914,8 +911,6 @@ aarch64_simd_expand_args (rtx target, int icode, int have_retval, } } - va_end (ap); - if (have_retval) switch (argc) { @@ -1029,12 +1024,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