| 1 |
/* Test AAPCS64 layout. |
| 2 |
|
| 3 |
Test some small structures that should be passed in GPRs. */ |
| 4 |
|
| 5 |
/* { dg-do run { target aarch64*-*-* } } */ |
| 6 |
|
| 7 |
#ifndef IN_FRAMEWORK |
| 8 |
#define TESTFILE "test_dfp_26.c" |
| 9 |
|
| 10 |
struct y0 |
| 11 |
{ |
| 12 |
char ch; |
| 13 |
} c0 = { 'A' }; |
| 14 |
|
| 15 |
struct y2 |
| 16 |
{ |
| 17 |
long long ll[2]; |
| 18 |
} c2 = { 0xDEADBEEF, 0xCAFEBABE }; |
| 19 |
|
| 20 |
struct y3 |
| 21 |
{ |
| 22 |
int i[3]; |
| 23 |
} c3 = { 56789, 67890, 78901 }; |
| 24 |
|
| 25 |
typedef _Decimal32 vf2_t __attribute__((vector_size (8))); |
| 26 |
struct x0 |
| 27 |
{ |
| 28 |
vf2_t v; |
| 29 |
} s0; |
| 30 |
|
| 31 |
typedef short vh4_t __attribute__((vector_size (8))); |
| 32 |
|
| 33 |
struct x1 |
| 34 |
{ |
| 35 |
vh4_t v[2]; |
| 36 |
} s1; |
| 37 |
|
| 38 |
#define HAS_DATA_INIT_FUNC |
| 39 |
void init_data () |
| 40 |
{ |
| 41 |
s0.v = (vf2_t){ 17.df, 18.df }; |
| 42 |
s1.v[0] = (vh4_t){ 345, 456, 567, 678 }; |
| 43 |
s1.v[1] = (vh4_t){ 789, 890, 901, 123 }; |
| 44 |
} |
| 45 |
|
| 46 |
#include "abitest.h" |
| 47 |
#else |
| 48 |
ARG (struct y0, c0, X0) |
| 49 |
ARG (struct y2, c2, X1) |
| 50 |
ARG (struct y3, c3, X3) |
| 51 |
ARG_NONFLAT (struct x0, s0, D0, f32in64) |
| 52 |
ARG (struct x1, s1, D1) |
| 53 |
LAST_ARG_NONFLAT (int, 89012, X5, i32in64) |
| 54 |
#endif |