(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
advsimd-intrinsics/
vcvth_n_f16_u32_1.c
       1  /* { dg-do run } */
       2  /* { dg-require-effective-target arm_v8_2a_fp16_scalar_hw } */
       3  /* { dg-add-options arm_v8_2a_fp16_scalar }  */
       4  
       5  #include <arm_fp16.h>
       6  
       7  /* Input values.  */
       8  uint32_t input[] =
       9  {
      10    0, -0,
      11    123, -567,
      12    -34, 1024,
      13    -63, 169,
      14    -4, 77,
      15    -144, -56,
      16    -16, -15,
      17    -14, -13,
      18  };
      19  
      20  /* Expected results (16-bit hexadecimal representation).  */
      21  uint16_t expected_1[] =
      22  {
      23    0x0000 /* 0.000000 */,
      24    0x0000 /* 0.000000 */,
      25    0x53b0 /* 61.500000 */,
      26    0x7c00 /* inf */,
      27    0x7c00 /* inf */,
      28    0x6000 /* 512.000000 */,
      29    0x7c00 /* inf */,
      30    0x5548 /* 84.500000 */,
      31    0x7c00 /* inf */,
      32    0x50d0 /* 38.500000 */,
      33    0x7c00 /* inf */,
      34    0x7c00 /* inf */,
      35    0x7c00 /* inf */,
      36    0x7c00 /* inf */,
      37    0x7c00 /* inf */,
      38    0x7c00 /* inf */
      39  };
      40  
      41  uint16_t expected_2[] =
      42  {
      43    0x0000 /* 0.000000 */,
      44    0x0000 /* 0.000000 */,
      45    0x4fb0 /* 30.750000 */,
      46    0x7c00 /* inf */,
      47    0x7c00 /* inf */,
      48    0x5c00 /* 256.000000 */,
      49    0x7c00 /* inf */,
      50    0x5148 /* 42.250000 */,
      51    0x7c00 /* inf */,
      52    0x4cd0 /* 19.250000 */,
      53    0x7c00 /* inf */,
      54    0x7c00 /* inf */,
      55    0x7c00 /* inf */,
      56    0x7c00 /* inf */,
      57    0x7c00 /* inf */,
      58    0x7c00 /* inf */
      59  };
      60  
      61  uint16_t expected_3[] =
      62  {
      63    0x0000 /* 0.000000 */,
      64    0x0000 /* 0.000000 */,
      65    0x0000 /* 0.000000 */,
      66    0x3c00 /* 1.000000 */,
      67    0x3c00 /* 1.000000 */,
      68    0x0004 /* 0.000000 */,
      69    0x3c00 /* 1.000000 */,
      70    0x0001 /* 0.000000 */,
      71    0x3c00 /* 1.000000 */,
      72    0x0000 /* 0.000000 */,
      73    0x3c00 /* 1.000000 */,
      74    0x3c00 /* 1.000000 */,
      75    0x3c00 /* 1.000000 */,
      76    0x3c00 /* 1.000000 */,
      77    0x3c00 /* 1.000000 */,
      78    0x3c00 /* 1.000000 */
      79  };
      80  
      81  #define TEST_MSG "VCVTH_N_F16_U32"
      82  #define INSN_NAME vcvth_n_f16_u32
      83  
      84  #define INPUT input
      85  #define EXPECTED_1 expected_1
      86  #define EXPECTED_2 expected_2
      87  #define EXPECTED_3 expected_3
      88  
      89  #define INPUT_TYPE uint32_t
      90  #define OUTPUT_TYPE float16_t
      91  #define OUTPUT_TYPE_SIZE 16
      92  
      93  #define SCALAR_OPERANDS
      94  #define SCALAR_1 1
      95  #define SCALAR_2 2
      96  #define SCALAR_3 32
      97  
      98  /* Include the template for unary scalar operations.  */
      99  #include "unary_scalar_op.inc"