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 0x4000 /* 2.000000 */, 13 0x4400 /* 4.000000 */, 14 0x4d00 /* 20.000000 */, 15 0x3c00 /* 1.000000 */, 16 0xc000 /* -2.000000 */, 17 0x4000 /* 2.000000 */, 18 0xc700 /* -7.000000 */, 19 0x3c00 /* 1.000000 */, 20 0x3c00 /* 1.000000 */, 21 0x3c00 /* 1.000000 */, 22 0x3c00 /* 1.000000 */, 23 0x4b00 /* 14.000000 */, 24 0xc600 /* -6.000000 */, 25 0x4d00 /* 20.000000 */, 26 0x7c00 /* inf */, 27 0xfc00 /* -inf */ 28 }; 29 30 #define TEST_MSG "VRNDPH_F16" 31 #define INSN_NAME vrndph_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