| Index: test/cctest/test-disasm-x64.cc
|
| diff --git a/test/cctest/test-disasm-x64.cc b/test/cctest/test-disasm-x64.cc
|
| index 284ca859bef204843af60fab34eab48c3c4464e2..af8beaaa83a90694002eb58d7c3e5d1a7c77f6fd 100644
|
| --- a/test/cctest/test-disasm-x64.cc
|
| +++ b/test/cctest/test-disasm-x64.cc
|
| @@ -50,7 +50,7 @@ TEST(DisasmX64) {
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| HandleScope scope(isolate);
|
| - v8::internal::byte buffer[4096];
|
| + v8::internal::byte buffer[8192];
|
| Assembler assm(isolate, buffer, sizeof buffer);
|
| DummyStaticFunction(NULL); // just bloody use it (DELETE; debugging)
|
|
|
| @@ -420,7 +420,8 @@ TEST(DisasmX64) {
|
| __ ucomiss(xmm0, xmm1);
|
| __ ucomiss(xmm0, Operand(rbx, rcx, times_4, 10000));
|
| }
|
| - // SSE 2 instructions
|
| +
|
| + // SSE2 instructions
|
| {
|
| __ cvttsd2si(rdx, Operand(rbx, rcx, times_4, 10000));
|
| __ cvttsd2si(rdx, xmm1);
|
| @@ -467,6 +468,13 @@ TEST(DisasmX64) {
|
| __ punpckldq(xmm1, xmm11);
|
| __ punpckldq(xmm5, Operand(rdx, 4));
|
| __ punpckhdq(xmm8, xmm15);
|
| +
|
| +#define EMIT_SSE2_INSTR(instruction, notUsed1, notUsed2, notUsed3) \
|
| + __ instruction(xmm5, xmm1); \
|
| + __ instruction(xmm5, Operand(rdx, 4));
|
| +
|
| + SSE2_INSTRUCTION_LIST(EMIT_SSE2_INSTR)
|
| +#undef EMIT_SSE2_INSTR
|
| }
|
|
|
| // cmov.
|
| @@ -490,6 +498,24 @@ TEST(DisasmX64) {
|
| }
|
|
|
| {
|
| + if (CpuFeatures::IsSupported(SSE3)) {
|
| + CpuFeatureScope scope(&assm, SSE3);
|
| + __ lddqu(xmm1, Operand(rdx, 4));
|
| + }
|
| + }
|
| +
|
| +#define EMIT_SSE34_INSTR(instruction, notUsed1, notUsed2, notUsed3, notUsed4) \
|
| + __ instruction(xmm5, xmm1); \
|
| + __ instruction(xmm5, Operand(rdx, 4));
|
| +
|
| + {
|
| + if (CpuFeatures::IsSupported(SSSE3)) {
|
| + CpuFeatureScope scope(&assm, SSSE3);
|
| + SSSE3_INSTRUCTION_LIST(EMIT_SSE34_INSTR)
|
| + }
|
| + }
|
| +
|
| + {
|
| if (CpuFeatures::IsSupported(SSE4_1)) {
|
| CpuFeatureScope scope(&assm, SSE4_1);
|
| __ insertps(xmm5, xmm1, 123);
|
| @@ -539,12 +565,10 @@ TEST(DisasmX64) {
|
| __ movups(xmm5, xmm1);
|
| __ movups(xmm5, Operand(rdx, 4));
|
| __ movups(Operand(rdx, 4), xmm5);
|
| - __ paddd(xmm5, xmm1);
|
| - __ paddd(xmm5, Operand(rdx, 4));
|
| - __ psubd(xmm5, xmm1);
|
| - __ psubd(xmm5, Operand(rdx, 4));
|
| __ pmulld(xmm5, xmm1);
|
| __ pmulld(xmm5, Operand(rdx, 4));
|
| + __ pmullw(xmm5, xmm1);
|
| + __ pmullw(xmm5, Operand(rdx, 4));
|
| __ pmuludq(xmm5, xmm1);
|
| __ pmuludq(xmm5, Operand(rdx, 4));
|
| __ psrldq(xmm5, 123);
|
| @@ -553,8 +577,11 @@ TEST(DisasmX64) {
|
| __ cvtps2dq(xmm5, Operand(rdx, 4));
|
| __ cvtdq2ps(xmm5, xmm1);
|
| __ cvtdq2ps(xmm5, Operand(rdx, 4));
|
| +
|
| + SSE4_INSTRUCTION_LIST(EMIT_SSE34_INSTR)
|
| }
|
| }
|
| +#undef EMIT_SSE34_INSTR
|
|
|
| // AVX instruction
|
| {
|
| @@ -678,6 +705,41 @@ TEST(DisasmX64) {
|
| __ vcmpnltpd(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000));
|
| __ vcmpnlepd(xmm5, xmm4, xmm1);
|
| __ vcmpnlepd(xmm5, xmm4, Operand(rbx, rcx, times_4, 10000));
|
| +
|
| +#define EMIT_SSE2_AVXINSTR(instruction, notUsed1, notUsed2, notUsed3) \
|
| + __ v##instruction(xmm10, xmm5, xmm1); \
|
| + __ v##instruction(xmm10, xmm5, Operand(rdx, 4));
|
| +
|
| +#define EMIT_SSE34_AVXINSTR(instruction, notUsed1, notUsed2, notUsed3, \
|
| + notUsed4) \
|
| + __ v##instruction(xmm10, xmm5, xmm1); \
|
| + __ v##instruction(xmm10, xmm5, Operand(rdx, 4));
|
| +
|
| + SSE2_INSTRUCTION_LIST(EMIT_SSE2_AVXINSTR)
|
| + SSSE3_INSTRUCTION_LIST(EMIT_SSE34_AVXINSTR)
|
| + SSE4_INSTRUCTION_LIST(EMIT_SSE34_AVXINSTR)
|
| +#undef EMIT_SSE2_AVXINSTR
|
| +#undef EMIT_SSE34_AVXINSTR
|
| +
|
| + __ vlddqu(xmm1, Operand(rbx, rcx, times_4, 10000));
|
| + __ vpsllw(xmm0, xmm15, 21);
|
| + __ vpsrlw(xmm0, xmm15, 21);
|
| + __ vpsraw(xmm0, xmm15, 21);
|
| + __ vpsrad(xmm0, xmm15, 21);
|
| + __ vpextrb(rax, xmm2, 12);
|
| + __ vpextrb(Operand(rbx, rcx, times_4, 10000), xmm2, 12);
|
| + __ vpextrw(rax, xmm2, 5);
|
| + __ vpextrw(Operand(rbx, rcx, times_4, 10000), xmm2, 5);
|
| + __ vpextrd(rax, xmm2, 2);
|
| + __ vpextrd(Operand(rbx, rcx, times_4, 10000), xmm2, 2);
|
| +
|
| + __ vpinsrb(xmm1, xmm2, rax, 12);
|
| + __ vpinsrb(xmm1, xmm2, Operand(rbx, rcx, times_4, 10000), 12);
|
| + __ vpinsrw(xmm1, xmm2, rax, 5);
|
| + __ vpinsrw(xmm1, xmm2, Operand(rbx, rcx, times_4, 10000), 5);
|
| + __ vpinsrd(xmm1, xmm2, rax, 2);
|
| + __ vpinsrd(xmm1, xmm2, Operand(rbx, rcx, times_4, 10000), 2);
|
| + __ vpshufd(xmm1, xmm2, 85);
|
| }
|
| }
|
|
|
|
|