| 1 |
/* { dg-require-effective-target arm_v8_2a_fp16_scalar_hw } */ |
| 2 |
/* { dg-add-options arm_v8_2a_fp16_scalar } */ |
| 3 |
|
| 4 |
#include <arm_fp16.h> |
| 5 |
|
| 6 |
/* Input values. */ |
| 7 |
float16_t input[] = |
| 8 |
{ |
| 9 |
0.0, -0.0, |
| 10 |
123.4, -567.8, |
| 11 |
-34.8, 1024, |
| 12 |
663.1, 169.1, |
| 13 |
-4.8, 77.0, |
| 14 |
-144.5, -56.8, |
| 15 |
|
| 16 |
(float16_t) -16, (float16_t) -15, |
| 17 |
(float16_t) -14, (float16_t) -13, |
| 18 |
}; |
| 19 |
|
| 20 |
/* Expected results (32-bit hexadecimal representation). */ |
| 21 |
uint32_t expected[] = |
| 22 |
{ |
| 23 |
0x00000000, |
| 24 |
0x00000000, |
| 25 |
0x0000007b, |
| 26 |
0x00000000, |
| 27 |
0x00000000, |
| 28 |
0x00000400, |
| 29 |
0x00000297, |
| 30 |
0x000000a9, |
| 31 |
0x00000000, |
| 32 |
0x0000004d, |
| 33 |
0x00000000, |
| 34 |
0x00000000, |
| 35 |
0x00000000, |
| 36 |
0x00000000, |
| 37 |
0x00000000, |
| 38 |
0x00000000, |
| 39 |
}; |
| 40 |
|
| 41 |
#define TEST_MSG "VCVTH_U32_F16" |
| 42 |
#define INSN_NAME vcvth_u32_f16 |
| 43 |
|
| 44 |
#define INPUT input |
| 45 |
#define EXPECTED expected |
| 46 |
|
| 47 |
#define INPUT_TYPE float16_t |
| 48 |
#define OUTPUT_TYPE uint32_t |
| 49 |
#define OUTPUT_TYPE_SIZE 32 |
| 50 |
|
| 51 |
/* Include the template for unary scalar operations. */ |
| 52 |
#include "unary_scalar_op.inc" |