Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/aapcs64/test_dfp_25.c

raw
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_dfp_25.c"
11
12 typedef _Decimal32 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 _Decimal32 vf4_t __attribute__((vector_size(16)));
27 struct x1
28 {
29 vf4_t v;
30 } s1;
31
32 struct x2
33 {
34 _Decimal64 df[3];
35 } s2;
36
37 #define HAS_DATA_INIT_FUNC
38 void init_data ()
39 {
40 s0.v = (vf2_t){ 17.df, 18.df };
41 s1.v = (vf4_t){ 567.890df, 678.901df, 789.012df, 890.123df };
42 s2.df[0] = 123.456dd;
43 s2.df[1] = 234.567dd;
44 s2.df[2] = 345.678dd;
45 s3.v[0] = (vf2_t){ 19.df, 20.df };
46 s3.v[1] = (vf2_t){ 23.df, 24.df };
47 s4.v[0] = (vf2_t){ 27.df, 28.df };
48 s4.v[1] = (vf2_t){ 31.df, 32.df };
49 s4.v[2] = (vf2_t){ 35.df, 36.df };
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 (_Decimal64, 456.789dd, STACK+24)
61 #endif