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  /* { dg-skip-if "" { arm*-*-* } } */
       5  
       6  #include <arm_fp16.h>
       7  
       8  /* Input values.  */
       9  int64_t input[] = { 1, 10, 48, 100, -1, -10, 7, -7 };
      10  
      11  /* Expected results (16-bit hexadecimal representation).  */
      12  uint16_t expected_1[] = { 0x3800 /* 0.5.  */,
      13  			  0x4500 /* 5.  */,
      14  			  0x4E00 /* 24.  */,
      15  			  0x5240 /* 50.  */,
      16  			  0xB800 /* -0.5.  */,
      17  			  0xC500 /* -5.  */,
      18  			  0x4300 /* 3.5.  */,
      19  			  0xC300 /* -3.5.  */ };
      20  
      21  uint16_t expected_2[] = { 0x3400 /* 0.25.  */,
      22  			  0x4100 /* 2.5.  */,
      23  			  0x4A00 /* 12.  */,
      24  			  0x4E40 /* 25.  */,
      25  			  0xB400 /* -0.25.  */,
      26  			  0xC100 /* -2.5.  */,
      27  			  0x3F00 /* 1.75.  */,
      28  			  0xBF00 /* -1.75.  */ };
      29  
      30  #define TEST_MSG "VCVTH_N_F16_S64"
      31  #define INSN_NAME vcvth_n_f16_s64
      32  
      33  #define INPUT input
      34  #define EXPECTED_1 expected_1
      35  #define EXPECTED_2 expected_2
      36  
      37  #define INPUT_TYPE int64_t
      38  #define OUTPUT_TYPE float16_t
      39  #define OUTPUT_TYPE_SIZE 16
      40  
      41  #define SCALAR_OPERANDS
      42  #define SCALAR_1 1
      43  #define SCALAR_2 2
      44  
      45  /* Include the template for unary scalar operations.  */
      46  #include "unary_scalar_op.inc"