Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-7.c

raw
1 /* Test AAPCS64 layout and __builtin_va_arg.
2
3 This test covers complex types. Complex floating-point types are treated
4 as homogeneous floating-point aggregates, while complex integral types
5 are treated as general composite types. */
6
7 /* { dg-do run { target aarch64*-*-* } } */
8
9 #ifndef IN_FRAMEWORK
10 #define AAPCS64_TEST_STDARG
11 #define TESTFILE "va_arg-7.c"
12 #include "type-def.h"
13
14 _Complex __int128 complex_qword = 567890 + 678901i;
15
16 #include "abitest.h"
17 #else
18 ARG (int, 1, W0, LAST_NAMED_ARG_ID)
19 DOTS
20 /* Complex floating-point types are passed in fp/simd registers. */
21 ANON (_Complex float , 12.3f + 23.4fi , S0, 0)
22 ANON (_Complex double , 34.56 + 45.67i , D2, 1)
23 ANON (_Complex long double, 56789.01234L + 67890.12345Li, Q4, 2)
24
25 /* Complex integral types are passed in general registers or via reference. */
26 ANON (_Complex short , (_Complex short) (12345 + 23456i), X1, 10)
27 ANON (_Complex int , 34567 + 45678i , X2, 11)
28 PTR_ANON (_Complex __int128 , complex_qword , X3, 12)
29
30 LAST_ANON(int , 1 , W4, 20)
31 #endif