| 1 |
/* Test AAPCS64 layout and __builtin_va_arg. |
| 2 |
|
| 3 |
This test is focus on certain unnamed homogeneous floating-point aggregate |
| 4 |
types passed in fp/simd registers. */ |
| 5 |
|
| 6 |
/* { dg-do run { target aarch64*-*-* } } */ |
| 7 |
|
| 8 |
#ifndef IN_FRAMEWORK |
| 9 |
#define AAPCS64_TEST_STDARG |
| 10 |
#define TESTFILE "va_arg_dfp-6.c" |
| 11 |
#include "type-def.h" |
| 12 |
|
| 13 |
struct hfa_dfx1_t hfa_dfx1 = {12.345df}; |
| 14 |
struct hfa_ddx2_t hfa_ddx2 = {234.567dd, 345.678dd}; |
| 15 |
struct hfa_dffs_t hfa_dffs; |
| 16 |
union hfa_dunion_t hfa_dunion; |
| 17 |
|
| 18 |
#define HAS_DATA_INIT_FUNC |
| 19 |
void init_data () |
| 20 |
{ |
| 21 |
hfa_dunion.s.a = 37.df; |
| 22 |
hfa_dunion.s.b = 38.df; |
| 23 |
hfa_dunion.c = 39.df; |
| 24 |
|
| 25 |
hfa_ffs.a = 42.f; |
| 26 |
hfa_ffs.b = 43.f; |
| 27 |
hfa_ffs.c.a = 44.f; |
| 28 |
hfa_ffs.c.b = 45.f; |
| 29 |
} |
| 30 |
|
| 31 |
#include "abitest.h" |
| 32 |
#else |
| 33 |
ARG (int, 1, W0, LAST_NAMED_ARG_ID) |
| 34 |
DOTS |
| 35 |
ANON (struct hfa_dffs_t , hfa_dffs , S0 , 0) |
| 36 |
ANON (union hfa_dunion_t, hfa_dunion, S4 , 1) |
| 37 |
ANON (struct hfa_ddx2_t , hfa_ddx2 , D6 , 2) |
| 38 |
ANON (struct hfa_dfx1_t , hfa_dfx1 , STACK , 3) |
| 39 |
LAST_ANON(_Decimal64 , 1.0dd , STACK+8, 4) |
| 40 |
#endif |