1 // This is more or less a copy/paste from the generated insn_sse2.c
2 // I didn't want to mess with the perl generator because
3 // GCC and clang don't agree on the asm syntax
4 // Using the rex prefix looks like a bug or misfeature in OpenJDK
5 // so I'm assuming that this is a one-off and not a general issue
19 unsigned long long int uq
[2];
22 } __attribute__ ((aligned (16)));
24 static sigjmp_buf catchpoint
;
26 static void handle_sigill(int signum
)
28 siglongjmp(catchpoint
, 1);
31 /* with redundant rex.W */
32 static void psllq_4(void)
34 reg128_t arg1
= { .uq
= { 0x0123456789abcdefULL
, 0x0123456789abcdefULL
} };
38 if (sigsetjmp(catchpoint
, 1) == 0)
48 //".rex.W psllq $12, %%xmm1\n"
50 //"data16 rex64 psllq $12, %mm1\n"
51 ".byte 0x66,0x48,0x0f,0x73,0xf1,0x0c\n"
55 : "=m" (result0
.uq
[0]), "=m" (result0
.uq
[1])
56 : "m" (arg1
.uq
[0]), "m" (arg1
.uq
[1]), "m" (state
[0])
60 if (result0
.uq
[0] == 0x3456789abcdef000ULL
&& result0
.uq
[1] == 0x3456789abcdef000ULL
)
62 std::cout
<< "psllq_4 ... ok\n";
66 std::cout
<< "psllq_4 ... not ok\n";
67 std::cout
<< " result0.uq[0] = " << result0
.uq
[0] << " (expected " << 0x3456789abcdef000ULL
<< ")\n";
68 std::cout
<< " result0.uq[1] = " << result0
.uq
[1] << " (expected " << 0x3456789abcdef000ULL
<< ")\n";
73 std::cout
<< "psllq_4 ... failed\n";
81 signal(SIGILL
, handle_sigill
);