| 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 |
0x42af /* 3.341797 */, |
| 12 |
0x5043 /* 34.093750 */, |
| 13 |
0xccd2 /* -19.281250 */, |
| 14 |
0x3712 /* 0.441895 */, |
| 15 |
0x3acc /* 0.849609 */, |
| 16 |
0x4848 /* 8.562500 */, |
| 17 |
0xcc43 /* -17.046875 */, |
| 18 |
0xd65c /* -101.750000 */, |
| 19 |
0x4185 /* 2.759766 */, |
| 20 |
0xcd39 /* -20.890625 */, |
| 21 |
0xd45b /* -69.687500 */, |
| 22 |
0x5241 /* 50.031250 */, |
| 23 |
0xc675 /* -6.457031 */, |
| 24 |
0x4d07 /* 20.109375 */, |
| 25 |
0x7c00 /* inf */, |
| 26 |
0xfc00 /* -inf */ |
| 27 |
}; |
| 28 |
|
| 29 |
#define TEST_MSG "VFMSH_F16" |
| 30 |
#define INSN_NAME vfmsh_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 binary scalar operations. */ |
| 39 |
#include "ternary_scalar_op.inc" |