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[] = 22 { 23 0x0000 /* 0.000000 */, 24 0x0000 /* 0.000000 */, 25 0x57b0 /* 123.000000 */, 26 0xe06e /* -567.000000 */, 27 0xd040 /* -34.000000 */, 28 0x6400 /* 1024.000000 */, 29 0xd3e0 /* -63.000000 */, 30 0x5948 /* 169.000000 */, 31 0xc400 /* -4.000000 */, 32 0x54d0 /* 77.000000 */, 33 0xd880 /* -144.000000 */, 34 0xd300 /* -56.000000 */, 35 0xcc00 /* -16.000000 */, 36 0xcb80 /* -15.000000 */, 37 0xcb00 /* -14.000000 */, 38 0xca80 /* -13.000000 */ 39 }; 40 41 #define TEST_MSG "VCVTH_F16_S32" 42 #define INSN_NAME vcvth_f16_s32 43 44 #define INPUT input 45 #define EXPECTED expected 46 47 #define INPUT_TYPE uint32_t 48 #define OUTPUT_TYPE float16_t 49 #define OUTPUT_TYPE_SIZE 16 50 51 /* Include the template for unary scalar operations. */ 52 #include "unary_scalar_op.inc" 53