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  
      10  float16_t input[] = { 123.4, 567.8, 34.8, 1024, 663.1, 144.0, 4.8, 77 };
      11  /*  Expected results are calculated by:
      12    for (index = 0; index < 8; index++)
      13      {
      14        uint16_t src_cast = * (uint16_t *) &src[index];
      15        * (uint16_t *) &expected[index] =
      16  	(src_cast & 0x8000) | (~src_cast & 0x7C00);
      17      }  */
      18  uint16_t expected[8] = { 0x2800, 0x1C00, 0x2C00, 0x1800,
      19  			 0x1C00, 0x2400, 0x3800, 0x2800 };
      20  
      21  #define TEST_MSG "VRECPXH_F16"
      22  #define INSN_NAME vrecpxh_f16
      23  
      24  #define INPUT input
      25  #define EXPECTED expected
      26  
      27  #define INPUT_TYPE float16_t
      28  #define OUTPUT_TYPE float16_t
      29  #define OUTPUT_TYPE_SIZE 16
      30  
      31  /* Include the template for unary scalar operations.  */
      32  #include "unary_scalar_op.inc"