(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
aapcs64/
test_align-3.c
       1  /* Test AAPCS64 layout.
       2  
       3     C.8  If the argument has an alignment of 16 then the NGRN is rounded up
       4  	the next even number.
       5     C.9  If the argument is an Integral Type, the size of the argument is
       6  	equal to 16 and the NGRN is less than 7, the argument is copied
       7  	to x[NGRN] and x[NGRN+1]. x[NGRN] shall contain the lower addressed
       8  	double-word of the memory representation of the argument.  The
       9  	NGRN is incremented by two.  The argument has now been allocated.
      10  
      11     The case of passing a 128-bit integer in two general registers is covered
      12     in this test.  */
      13  
      14  /* { dg-do run { target aarch64*-*-* } } */
      15  
      16  #ifndef IN_FRAMEWORK
      17  #define TESTFILE "test_align-3.c"
      18  #include "type-def.h"
      19  
      20  union int128_t qword;
      21  
      22  int gInt[4];
      23  
      24  #define HAS_DATA_INIT_FUNC
      25  void init_data ()
      26  {
      27    /* Initialize the quadword integer via the union.  */
      28    qword.l64 = 0xDEADBEEFCAFEBABELL;
      29    qword.h64 = 0x123456789ABCDEF0LL;
      30  
      31    gInt[0] = 12345;
      32    gInt[1] = 23456;
      33    gInt[2] = 34567;
      34    gInt[3] = 45678;
      35  }
      36  
      37  
      38  #include "abitest.h"
      39  #else
      40    ARG(int, gInt[0], W0)
      41    ARG(int, gInt[1], W1)
      42    ARG(int, gInt[2], W2)
      43    ARG(__int128, qword.i, X4)
      44    LAST_ARG(int, gInt[3], W6)
      45  
      46  #endif