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 uint16_t input[] = { 1, 10, 48, 100, 1000, 0, 500, 9 };
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 			  0x5FD0 /* 500.  */,
17 			  0x0000 /* 0.0.  */,
18 			  0x5BD0 /* 250.  */,
19 			  0x4480 /* 4.5.  */ };
20 
21 uint16_t expected_2[] = { 0x3400 /* 0.25.  */,
22 			  0x4100 /* 2.5.  */,
23 			  0x4A00 /* 12.  */,
24 			  0x4E40 /* 25.  */,
25 			  0x5BD0 /* 250.  */,
26 			  0x0000 /* 0.0.  */,
27 			  0x57D0 /* 125.  */,
28 			  0x4080 /* 2.25.  */ };
29 
30 #define TEST_MSG "VCVTH_N_F16_U16"
31 #define INSN_NAME vcvth_n_f16_u16
32 
33 #define INPUT input
34 #define EXPECTED_1 expected_1
35 #define EXPECTED_2 expected_2
36 
37 #define INPUT_TYPE uint16_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"
47