| 1 |
/* Test AAPCS64 layout. |
| 2 |
|
| 3 |
C.3 If the argument is an HFA then the NSRN is set to 8 and the size |
| 4 |
of the argument is rounded up to the nearest multiple of 8 bytes. |
| 5 |
|
| 6 |
TODO: add the check of an HFA containing half-precision floating-point |
| 7 |
when __f16 is supported in A64 GCC. */ |
| 8 |
|
| 9 |
/* { dg-do run { target aarch64*-*-* } } */ |
| 10 |
|
| 11 |
#ifndef IN_FRAMEWORK |
| 12 |
#define TESTFILE "test_align_dfp-4.c" |
| 13 |
|
| 14 |
struct z1 |
| 15 |
{ |
| 16 |
_Decimal64 x[4]; |
| 17 |
}; |
| 18 |
|
| 19 |
struct z1 a = { 5.0dd, 6.0dd, 7.0dd, 8.0dd }; |
| 20 |
|
| 21 |
struct z2 |
| 22 |
{ |
| 23 |
_Decimal32 x[3]; |
| 24 |
}; |
| 25 |
|
| 26 |
struct z2 b = { 13.df, 14.df, 15.df }; |
| 27 |
struct z2 c = { 16.df, 17.df, 18.df }; |
| 28 |
|
| 29 |
#include "abitest.h" |
| 30 |
#else |
| 31 |
|
| 32 |
ARG(struct z1, a, D0) |
| 33 |
ARG(_Decimal64, 9.0dd, D4) |
| 34 |
ARG(_Decimal64, 10.0dd, D5) |
| 35 |
ARG(struct z2, b, STACK) /* [C.3] on stack and size padded to 16 bytes */ |
| 36 |
#ifndef __AAPCS64_BIG_ENDIAN__ |
| 37 |
ARG(_Decimal32, 15.5df, STACK+16) /* [C.3] NSRN has been set to 8 */ |
| 38 |
#else |
| 39 |
ARG(_Decimal32, 15.5df, STACK+20) |
| 40 |
#endif |
| 41 |
LAST_ARG(struct z2, c, STACK+24) |
| 42 |
#endif |