diff options
Diffstat (limited to 'deps/v8/test/cctest/test-disasm-x64.cc')
-rw-r--r-- | deps/v8/test/cctest/test-disasm-x64.cc | 96 |
1 files changed, 95 insertions, 1 deletions
diff --git a/deps/v8/test/cctest/test-disasm-x64.cc b/deps/v8/test/cctest/test-disasm-x64.cc index fac9226279..6cd58ec209 100644 --- a/deps/v8/test/cctest/test-disasm-x64.cc +++ b/deps/v8/test/cctest/test-disasm-x64.cc @@ -51,7 +51,7 @@ TEST(DisasmX64) { CcTest::InitializeVM(); Isolate* isolate = CcTest::i_isolate(); HandleScope scope(isolate); - v8::internal::byte buffer[2048]; + v8::internal::byte buffer[4096]; Assembler assm(isolate, buffer, sizeof buffer); DummyStaticFunction(NULL); // just bloody use it (DELETE; debugging) @@ -394,6 +394,14 @@ TEST(DisasmX64) { __ xorps(xmm0, Operand(rbx, rcx, times_4, 10000)); // Arithmetic operation + __ addss(xmm1, xmm0); + __ addss(xmm1, Operand(rbx, rcx, times_4, 10000)); + __ mulss(xmm1, xmm0); + __ mulss(xmm1, Operand(rbx, rcx, times_4, 10000)); + __ subss(xmm1, xmm0); + __ subss(xmm1, Operand(rbx, rcx, times_4, 10000)); + __ divss(xmm1, xmm0); + __ divss(xmm1, Operand(rbx, rcx, times_4, 10000)); __ addps(xmm1, xmm0); __ addps(xmm1, Operand(rbx, rcx, times_4, 10000)); __ subps(xmm1, xmm0); @@ -402,6 +410,9 @@ TEST(DisasmX64) { __ mulps(xmm1, Operand(rbx, rcx, times_4, 10000)); __ divps(xmm1, xmm0); __ divps(xmm1, Operand(rbx, rcx, times_4, 10000)); + + __ ucomiss(xmm0, xmm1); + __ ucomiss(xmm0, Operand(rbx, rcx, times_4, 10000)); } // SSE 2 instructions { @@ -464,6 +475,89 @@ TEST(DisasmX64) { } } + // AVX instruction + { + if (CpuFeatures::IsSupported(AVX)) { + CpuFeatureScope scope(&assm, AVX); + __ vaddsd(xmm0, xmm1, xmm2); + __ vaddsd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vmulsd(xmm0, xmm1, xmm2); + __ vmulsd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vsubsd(xmm0, xmm1, xmm2); + __ vsubsd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vdivsd(xmm0, xmm1, xmm2); + __ vdivsd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + } + } + + // FMA3 instruction + { + if (CpuFeatures::IsSupported(FMA3)) { + CpuFeatureScope scope(&assm, FMA3); + __ vfmadd132sd(xmm0, xmm1, xmm2); + __ vfmadd132sd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfmadd213sd(xmm0, xmm1, xmm2); + __ vfmadd213sd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfmadd231sd(xmm0, xmm1, xmm2); + __ vfmadd231sd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + + __ vfmadd132sd(xmm9, xmm10, xmm11); + __ vfmadd132sd(xmm9, xmm10, Operand(r9, r11, times_4, 10000)); + __ vfmadd213sd(xmm9, xmm10, xmm11); + __ vfmadd213sd(xmm9, xmm10, Operand(r9, r11, times_4, 10000)); + __ vfmadd231sd(xmm9, xmm10, xmm11); + __ vfmadd231sd(xmm9, xmm10, Operand(r9, r11, times_4, 10000)); + + __ vfmsub132sd(xmm0, xmm1, xmm2); + __ vfmsub132sd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfmsub213sd(xmm0, xmm1, xmm2); + __ vfmsub213sd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfmsub231sd(xmm0, xmm1, xmm2); + __ vfmsub231sd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + + __ vfnmadd132sd(xmm0, xmm1, xmm2); + __ vfnmadd132sd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfnmadd213sd(xmm0, xmm1, xmm2); + __ vfnmadd213sd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfnmadd231sd(xmm0, xmm1, xmm2); + __ vfnmadd231sd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + + __ vfnmsub132sd(xmm0, xmm1, xmm2); + __ vfnmsub132sd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfnmsub213sd(xmm0, xmm1, xmm2); + __ vfnmsub213sd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfnmsub231sd(xmm0, xmm1, xmm2); + __ vfnmsub231sd(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + + __ vfmadd132ss(xmm0, xmm1, xmm2); + __ vfmadd132ss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfmadd213ss(xmm0, xmm1, xmm2); + __ vfmadd213ss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfmadd231ss(xmm0, xmm1, xmm2); + __ vfmadd231ss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + + __ vfmsub132ss(xmm0, xmm1, xmm2); + __ vfmsub132ss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfmsub213ss(xmm0, xmm1, xmm2); + __ vfmsub213ss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfmsub231ss(xmm0, xmm1, xmm2); + __ vfmsub231ss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + + __ vfnmadd132ss(xmm0, xmm1, xmm2); + __ vfnmadd132ss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfnmadd213ss(xmm0, xmm1, xmm2); + __ vfnmadd213ss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfnmadd231ss(xmm0, xmm1, xmm2); + __ vfnmadd231ss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + + __ vfnmsub132ss(xmm0, xmm1, xmm2); + __ vfnmsub132ss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfnmsub213ss(xmm0, xmm1, xmm2); + __ vfnmsub213ss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + __ vfnmsub231ss(xmm0, xmm1, xmm2); + __ vfnmsub231ss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); + } + } // xchg. { __ xchgq(rax, rax); |