Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg_dfp-5.c

raw
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-5.c"
11 #include "type-def.h"
12
13 struct hfa_dfx1_t hfa_dfx1 = {12.345df};
14 struct hfa_dfx2_t hfa_dfx2 = {123.456df, 234.456df};
15 struct hfa_ddx2_t hfa_ddx2 = {234.567dd, 345.678dd};
16 struct hfa_ddx4_t hfa_ddx4 = {1234.123dd, 2345.234dd, 3456.345dd, 4567.456dd};
17 struct hfa_dldx3_t hfa_dldx3 = {123456.7890dl, 234567.8901dl, 345678.9012dl};
18 struct hfa_dffs_t hfa_dffs;
19 union hfa_dunion_t hfa_dunion;
20
21 #define HAS_DATA_INIT_FUNC
22 void init_data ()
23 {
24 hfa_dunion.s.a = 37.df;
25 hfa_dunion.s.b = 38.df;
26 hfa_dunion.c = 39.df;
27
28 hfa_dffs.a = 42.df;
29 hfa_dffs.b = 43.df;
30 hfa_dffs.c.a = 44.df;
31 hfa_dffs.c.b = 45.df;
32 }
33
34 #include "abitest.h"
35 #else
36 ARG (int, 1, W0, LAST_NAMED_ARG_ID)
37 DOTS
38 /* HFA passed in fp/simd registers or on stack. */
39 ANON (struct hfa_ddx4_t , hfa_ddx4 , D0 , 0)
40 ANON (struct hfa_dldx3_t, hfa_dldx3, Q4 , 1)
41 ANON (struct hfa_dffs_t , hfa_dffs , STACK , 2)
42 ANON (union hfa_dunion_t, hfa_dunion, STACK+16, 3)
43 ANON (struct hfa_dfx1_t , hfa_dfx1 , STACK+24, 4)
44 ANON (struct hfa_dfx2_t , hfa_dfx2 , STACK+32, 5)
45 ANON (struct hfa_ddx2_t , hfa_ddx2 , STACK+40, 6)
46 LAST_ANON(_Decimal64 , 1.0dd , STACK+56, 9)
47 #endif