| 1 |
/* Test AAPCS64 layout and __builtin_va_arg. |
| 2 |
|
| 3 |
This test is focused particularly on __fp16 unnamed homogeneous |
| 4 |
floating-point aggregate types which should be passed in fp/simd |
| 5 |
registers until we run out of those, then the stack. */ |
| 6 |
|
| 7 |
/* { dg-do run { target aarch64*-*-* } } */ |
| 8 |
|
| 9 |
#ifndef IN_FRAMEWORK |
| 10 |
#define AAPCS64_TEST_STDARG |
| 11 |
#define TESTFILE "va_arg_dfp-16.c" |
| 12 |
#include "type-def.h" |
| 13 |
|
| 14 |
struct hfa_f16x1_t hfa_f16x1 = {2.0f}; |
| 15 |
struct hfa_f16x2_t hfa_f16x2 = {4.0f, 8.0f}; |
| 16 |
struct hfa_f16x3_t hfa_f16x3 = {16.0f, 32.0f, 64.0f}; |
| 17 |
|
| 18 |
#include "abitest.h" |
| 19 |
#else |
| 20 |
ARG (int, 1, W0, LAST_NAMED_ARG_ID) |
| 21 |
DOTS |
| 22 |
ANON (struct hfa_f16x1_t, hfa_f16x1, H0 , 0) |
| 23 |
ANON (struct hfa_f16x2_t, hfa_f16x2, H1 , 1) |
| 24 |
ANON (struct hfa_f16x3_t, hfa_f16x3, H3 , 2) |
| 25 |
ANON (struct hfa_f16x2_t, hfa_f16x2, H6 , 3) |
| 26 |
ANON (struct hfa_f16x1_t, hfa_f16x1, STACK , 4) |
| 27 |
LAST_ANON(_Decimal64 , 1.0dd , STACK+8, 5) |
| 28 |
#endif |