[AArch64][1/4] Enable tree-stdarg pass for AArch64 by defining counter fields

Jiong Wang jiong.wang@foss.arm.com
Fri May 6 15:00:00 GMT 2016


This patch initialize va_list_gpr_counter_field and
va_list_fpr_counter_field properly for AArch64 backend that tree-stdarg
pass will be enabled.

The "required register" analysis is largely target independent, but the
user might operate on the inner offset field in vaarg structure directly,
for example:

   d = __builtin_va_arg (ap, int);
   ap.__gr_offs += 0x20;
   e = __builtin_va_arg (ap, int);

in which case tree-stdarg require us to tell him what's the backend offset
field inside vaarg structure that it can still figure out we actually need
to save 6 general registers.

ok for upstream?

2016-05-06  Jiong Wang  <jiong.wang@arm.com>
gcc/
   * config/aarch64/aarch64.c (aarch64_build_builtin_va_list): Initialize
   va_list_gpr_counter_field and va_list_fpr_counter_field.

gcc/testsuite/
   * gcc.dg/tree-ssa/stdarg-2.c: Enable all testcases for AArch64.
   * gcc.dg/tree-ssa/stdarg-3.c: Likewise.
   * gcc.dg/tree-ssa/stdarg-4.c: Likewise.
   * gcc.dg/tree-ssa/stdarg-5.c: Likewise.
   * gcc.dg/tree-ssa/stdarg-6.c: Likewise.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-1.patch
Type: text/x-patch
Size: 39386 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160506/e32abc80/attachment.bin>


More information about the Gcc-patches mailing list