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 /* Expected results (16-bit hexadecimal representation). */ 8 uint16_t expected[] = 9 { 10 0x0000 /* 0.000000 */, 11 0x8000 /* -0.000000 */, 12 0x3da8 /* 1.414062 */, 13 0x3f0b /* 1.760742 */, 14 0x4479 /* 4.472656 */, 15 0x390f /* 0.632324 */, 16 0x7e00 /* nan */, 17 0x3c9d /* 1.153320 */, 18 0x7e00 /* nan */, 19 0x3874 /* 0.556641 */, 20 0x38a2 /* 0.579102 */, 21 0x39a8 /* 0.707031 */, 22 0x3c00 /* 1.000000 */, 23 0x433f /* 3.623047 */, 24 0x7e00 /* nan */, 25 0x4479 /* 4.472656 */, 26 0x7c00 /* inf */, 27 0x7e00 /* nan */ 28 }; 29 30 #define TEST_MSG "VSQRTH_F16" 31 #define INSN_NAME vsqrth_f16 32 33 #define EXPECTED expected 34 35 #define INPUT_TYPE float16_t 36 #define OUTPUT_TYPE float16_t 37 #define OUTPUT_TYPE_SIZE 16 38 39 /* Include the template for unary scalar operations. */ 40 #include "unary_scalar_op.inc" 41