| 1 |
/* Test AAPCS64 layout |
| 2 |
|
| 3 |
Test named homogeneous floating-point aggregates of __fp16 data, |
| 4 |
which should be passed in SIMD/FP registers or via the stack. */ |
| 5 |
|
| 6 |
/* { dg-do run { target aarch64*-*-* } } */ |
| 7 |
|
| 8 |
#ifndef IN_FRAMEWORK |
| 9 |
#define TESTFILE "test_dfp_27.c" |
| 10 |
|
| 11 |
struct x0 |
| 12 |
{ |
| 13 |
__fp16 v[1]; |
| 14 |
} f16x1; |
| 15 |
|
| 16 |
struct x1 |
| 17 |
{ |
| 18 |
__fp16 v[2]; |
| 19 |
} f16x2; |
| 20 |
|
| 21 |
struct x2 |
| 22 |
{ |
| 23 |
__fp16 v[3]; |
| 24 |
} f16x3; |
| 25 |
|
| 26 |
#define HAS_DATA_INIT_FUNC |
| 27 |
void init_data () |
| 28 |
{ |
| 29 |
f16x1.v[0] = 2.0f; |
| 30 |
f16x2.v[0] = 4.0f; |
| 31 |
f16x2.v[1] = 8.0f; |
| 32 |
f16x3.v[0] = 16.0f; |
| 33 |
f16x3.v[1] = 32.0f; |
| 34 |
f16x3.v[2] = 64.0f; |
| 35 |
} |
| 36 |
|
| 37 |
#include "abitest.h" |
| 38 |
#else |
| 39 |
ARG (struct x0, f16x1, H0) |
| 40 |
ARG (struct x1, f16x2, H1) |
| 41 |
ARG (struct x2, f16x3, H3) |
| 42 |
ARG (struct x1, f16x2, H6) |
| 43 |
ARG (struct x0, f16x1, STACK) |
| 44 |
ARG (int, 0xdeadbeef, W0) |
| 45 |
LAST_ARG (_Decimal64, 456.789dd, STACK+8) |
| 46 |
#endif |