| 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 |
/* Expected results (16-bit hexadecimal representation). */ |
| 7 |
uint16_t expected[] = |
| 8 |
{ |
| 9 |
0x0000 /* 0.000000 */, |
| 10 |
0x8000 /* -0.000000 */, |
| 11 |
0x3da8 /* 1.414062 */, |
| 12 |
0x3f0b /* 1.760742 */, |
| 13 |
0x4479 /* 4.472656 */, |
| 14 |
0x390f /* 0.632324 */, |
| 15 |
0x7e00 /* nan */, |
| 16 |
0x3c9d /* 1.153320 */, |
| 17 |
0x7e00 /* nan */, |
| 18 |
0x3874 /* 0.556641 */, |
| 19 |
0x38a2 /* 0.579102 */, |
| 20 |
0x39a8 /* 0.707031 */, |
| 21 |
0x3c00 /* 1.000000 */, |
| 22 |
0x433f /* 3.623047 */, |
| 23 |
0x7e00 /* nan */, |
| 24 |
0x4479 /* 4.472656 */, |
| 25 |
0x7c00 /* inf */, |
| 26 |
0x7e00 /* nan */ |
| 27 |
}; |
| 28 |
|
| 29 |
#define TEST_MSG "VSQRTH_F16" |
| 30 |
#define INSN_NAME vsqrth_f16 |
| 31 |
|
| 32 |
#define EXPECTED expected |
| 33 |
|
| 34 |
#define INPUT_TYPE float16_t |
| 35 |
#define OUTPUT_TYPE float16_t |
| 36 |
#define OUTPUT_TYPE_SIZE 16 |
| 37 |
|
| 38 |
/* Include the template for unary scalar operations. */ |
| 39 |
#include "unary_scalar_op.inc" |