Debian Codegraph @

gcc/testsuite/gcc.target/arm/aapcs/align4.c

raw
1 /* Test AAPCS layout (alignment) - passing vectors in GPRs. */
2
3 /* { dg-do run { target arm_eabi } } */
4 /* { dg-require-effective-target arm32 } */
5 /* { dg-require-effective-target arm_neon_ok } */
6 /* { dg-require-effective-target arm_neon_hw } */
7 /* { dg-options "-O" } */
8 /* { dg-add-options arm_neon } */
9
10 #ifndef IN_FRAMEWORK
11 #define TESTFILE "align4.c"
12
13 #define PCSATTR __attribute__((pcs("aapcs")))
14
15 #include <arm_neon.h>
16
17 typedef __attribute__((aligned (4))) int32x2_t unalignedvec;
18
19 unalignedvec a = {11, 13};
20 unalignedvec b = {17, 19};
21
22 #include "abitest.h"
23 #else
24 ARG (int, 2, R0)
25 /* Attribute suggests R1, but we should use natural alignment: */
26 ARG (unalignedvec, a, R2)
27 ARG (int, 6, STACK)
28 /* Attribute would suggest STACK + 4 but should be ignored: */
29 LAST_ARG (unalignedvec, b, STACK + 8)
30 #endif