(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
aapcs64/
va_arg_dfp-13.c
       1  /* Test AAPCS64 layout and __builtin_va_start.
       2  
       3     Pass named HFA/HVA argument on stack.  */
       4  
       5  /* { dg-do run { target aarch64*-*-* } } */
       6  
       7  #ifndef IN_FRAMEWORK
       8  #define AAPCS64_TEST_STDARG
       9  #define TESTFILE "va_arg_dfp-13.c"
      10  
      11  struct float_float_t
      12  {
      13    _Decimal32 a;
      14    _Decimal32 b;
      15  } float_float;
      16  
      17  union float_int_t
      18  {
      19    _Decimal32 b8;
      20    int b5;
      21  } float_int;
      22  
      23  #define HAS_DATA_INIT_FUNC
      24  void
      25  init_data ()
      26  {
      27    float_float.a = 1.2df;
      28    float_float.b = 2.2df;
      29  
      30    float_int.b8 = 4983.80df;
      31  }
      32  
      33  #include "abitest.h"
      34  #else
      35    ARG (_Decimal32, 1.0df, S0, 0)
      36    ARG (_Decimal32, 2.0df, S1, 1)
      37    ARG (_Decimal32, 3.0df, S2, 2)
      38    ARG (_Decimal32, 4.0df, S3, 3)
      39    ARG (_Decimal32, 5.0df, S4, 4)
      40    ARG (_Decimal32, 6.0df, S5, 5)
      41    ARG (_Decimal32, 7.0df, S6, 6)
      42    ARG (struct float_float_t, float_float, STACK, 7)
      43    ARG (int,  9, W0, 8)
      44    ARG (int, 10, W1, 9)
      45    ARG (int, 11, W2, 10)
      46    ARG (int, 12, W3, 11)
      47    ARG (int, 13, W4, 12)
      48    ARG (int, 14, W5, 13)
      49    ARG (int, 15, W6, LAST_NAMED_ARG_ID)
      50    DOTS
      51    /* Note on the reason of using 'X7' instead of 'W7' here:
      52       Using 'X7' makes sure the test works in the big-endian mode.
      53       According to PCS rules B.4 and C.10, the size of float_int is rounded
      54       to 8 bytes and prepared in the register X7 as if loaded via LDR from
      55       the memory, with the content of the other 4 bytes unspecified.  The
      56       test framework will only compare the 4 relavent bytes.  */
      57    ANON (union float_int_t, float_int, X7, 15)
      58    LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
      59  #endif