| 1 |
/* Test AAPCS64 layout and __builtin_va_start. |
| 2 |
|
| 3 |
Pass named HFA/HVA argument on stack. */ |
| 4 |
|
| 5 |
/* { dg-do run { target aarch64*-*-* } } */ |
| 6 |
|
| 7 |
#ifndef IN_FRAMEWORK |
| 8 |
#define AAPCS64_TEST_STDARG |
| 9 |
#define TESTFILE "va_arg-14.c" |
| 10 |
#include "type-def.h" |
| 11 |
|
| 12 |
struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f}; |
| 13 |
struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f}; |
| 14 |
vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f}; |
| 15 |
vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f}; |
| 16 |
|
| 17 |
#include "abitest.h" |
| 18 |
#else |
| 19 |
ARG (float, 1.0f, S0, 0) |
| 20 |
ARG (float, 2.0f, S1, 1) |
| 21 |
ARG (float, 3.0f, S2, 2) |
| 22 |
ARG (float, 4.0f, S3, 3) |
| 23 |
ARG (float, 5.0f, S4, 4) |
| 24 |
ARG (float, 6.0f, S5, 5) |
| 25 |
ARG (float, 7.0f, S6, 6) |
| 26 |
ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7) |
| 27 |
/* Previous argument size has been rounded up to the nearest multiple of |
| 28 |
8 bytes. */ |
| 29 |
ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8) |
| 30 |
/* NSAA is rounded up to the nearest natural alignment of float32x4. */ |
| 31 |
ARG (vf4_t, float32x4, STACK + 32, 9) |
| 32 |
ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID) |
| 33 |
DOTS |
| 34 |
LAST_ANON (double, 123456789.987, STACK + 64, 11) |
| 35 |
#endif |