| 1 |
/* Test AAPCS64 layout |
| 2 |
|
| 3 |
Test homogeneous floating-point aggregates and homogeneous short-vector |
| 4 |
aggregates, which should be passed in SIMD/FP registers or via the |
| 5 |
stack. */ |
| 6 |
|
| 7 |
/* { dg-do run { target aarch64*-*-* } } */ |
| 8 |
|
| 9 |
#ifndef IN_FRAMEWORK |
| 10 |
#define TESTFILE "test_25.c" |
| 11 |
|
| 12 |
typedef float vf2_t __attribute__((vector_size (8))); |
| 13 |
struct x0 |
| 14 |
{ |
| 15 |
vf2_t v; |
| 16 |
} s0; |
| 17 |
struct x3 |
| 18 |
{ |
| 19 |
vf2_t v[2]; |
| 20 |
} s3; |
| 21 |
struct x4 |
| 22 |
{ |
| 23 |
vf2_t v[3]; |
| 24 |
} s4; |
| 25 |
|
| 26 |
typedef float vf4_t __attribute__((vector_size(16))); |
| 27 |
struct x1 |
| 28 |
{ |
| 29 |
vf4_t v; |
| 30 |
} s1; |
| 31 |
|
| 32 |
struct x2 |
| 33 |
{ |
| 34 |
double df[3]; |
| 35 |
} s2; |
| 36 |
|
| 37 |
#define HAS_DATA_INIT_FUNC |
| 38 |
void init_data () |
| 39 |
{ |
| 40 |
s0.v = (vf2_t){ 17.f, 18.f }; |
| 41 |
s1.v = (vf4_t){ 567.890f, 678.901f, 789.012f, 890.123f }; |
| 42 |
s2.df[0] = 123.456; |
| 43 |
s2.df[1] = 234.567; |
| 44 |
s2.df[2] = 345.678; |
| 45 |
s3.v[0] = (vf2_t){ 19.f, 20.f }; |
| 46 |
s3.v[1] = (vf2_t){ 23.f, 24.f }; |
| 47 |
s4.v[0] = (vf2_t){ 27.f, 28.f }; |
| 48 |
s4.v[1] = (vf2_t){ 31.f, 32.f }; |
| 49 |
s4.v[2] = (vf2_t){ 35.f, 36.f }; |
| 50 |
} |
| 51 |
|
| 52 |
#include "abitest.h" |
| 53 |
#else |
| 54 |
ARG (struct x0, s0, D0) |
| 55 |
ARG (struct x2, s2, D1) |
| 56 |
ARG (struct x1, s1, Q4) |
| 57 |
ARG (struct x3, s3, D5) |
| 58 |
ARG (struct x4, s4, STACK) |
| 59 |
ARG (int, 0xdeadbeef, W0) |
| 60 |
LAST_ARG (double, 456.789, STACK+24) |
| 61 |
#endif |