Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vcvth_n_f16_s64_1.c

raw
1 /* { dg-require-effective-target arm_v8_2a_fp16_scalar_hw } */
2 /* { dg-add-options arm_v8_2a_fp16_scalar } */
3 /* { dg-skip-if "" { arm*-*-* } } */
4
5 #include <arm_fp16.h>
6
7 /* Input values. */
8 int64_t input[] = { 1, 10, 48, 100, -1, -10, 7, -7 };
9
10 /* Expected results (16-bit hexadecimal representation). */
11 uint16_t expected_1[] = { 0x3800 /* 0.5. */,
12 0x4500 /* 5. */,
13 0x4E00 /* 24. */,
14 0x5240 /* 50. */,
15 0xB800 /* -0.5. */,
16 0xC500 /* -5. */,
17 0x4300 /* 3.5. */,
18 0xC300 /* -3.5. */ };
19
20 uint16_t expected_2[] = { 0x3400 /* 0.25. */,
21 0x4100 /* 2.5. */,
22 0x4A00 /* 12. */,
23 0x4E40 /* 25. */,
24 0xB400 /* -0.25. */,
25 0xC100 /* -2.5. */,
26 0x3F00 /* 1.75. */,
27 0xBF00 /* -1.75. */ };
28
29 #define TEST_MSG "VCVTH_N_F16_S64"
30 #define INSN_NAME vcvth_n_f16_s64
31
32 #define INPUT input
33 #define EXPECTED_1 expected_1
34 #define EXPECTED_2 expected_2
35
36 #define INPUT_TYPE int64_t
37 #define OUTPUT_TYPE float16_t
38 #define OUTPUT_TYPE_SIZE 16
39
40 #define SCALAR_OPERANDS
41 #define SCALAR_1 1
42 #define SCALAR_2 2
43
44 /* Include the template for unary scalar operations. */
45 #include "unary_scalar_op.inc"