4 /* Following instructions are tested:
5 test data class tests for
9 test data group tests for
15 static const pun_d32 d32_vals
[] = {
16 {0x22400000}, /* +0.0DF */
17 {0xa2400000}, /* -0.0DF */
18 {0x22400022}, /* +2.2DF */
19 {0xa2400022}, /* -2.2DF */
20 {0x78000000}, /* DEC_INFINITY */
21 {0xf8000000}, /* -DEC_INFINITY */
22 {0x7c000000}, /* +DEC_NAN */
23 {0xfc000000}, /* -DEC_NAN */
26 static const pun_d64 d64_vals
[] = {
27 {0x2234000000000000}, {0xa234000000000000}, {0x2234000000000022},
28 {0xa234000000000022}, {0x7800000000000000}, {0xf800000000000000},
29 {0x7c00000000000000}, {0xfc00000000000000},
32 static const pun_d128 d128_vals
[] = {
33 {{0x2207c00000000000, 0x0000000000000000}},
34 {{0xa207c00000000000, 0x0000000000000000}},
35 {{0x2207c00000000000, 0x0000000000000022}},
36 {{0xa207c00000000000, 0x0000000000000022}},
37 {{0x7800000000000000, 0x0000000000000000}},
38 {{0xf800000000000000, 0x0000000000000000}},
39 {{0x7c00000000000000, 0x0000000000000000}},
40 {{0xfc00000000000000, 0x0000000000000000}},
43 #define TEST(opcode, ty, n) \
46 for (unsigned j = 0; j != sizeof(ty##_vals) / sizeof(ty##_vals[0]); \
49 asm(".insn rxe, " opcode ", %[dec],0(%[bits])\n\t" \
53 : [dec] "f"(ty##_vals[j].f), [bits] "a"(num) \
63 /* The rightmost 12 bits 52:63 of the second operand are set and tested */
64 for (i
= 0; i
< 12; i
++) {
65 TEST("0xed0000000058", d128
, 1UL << i
); /* TDCXT */
66 TEST("0xed0000000059", d128
, 1UL << i
); /* TDGXT */
67 TEST("0xed0000000054", d64
, 1UL << i
); /* TDCDT */
68 TEST("0xed0000000055", d64
, 1UL << i
); /* TDGDT */
69 TEST("0xed0000000050", d32
, 1UL << i
); /* TDCET */
70 TEST("0xed0000000051", d32
, 1UL << i
); /* TDGET */