Index: test/cctest/test-disasm-ia32.cc |
diff --git a/test/cctest/test-disasm-ia32.cc b/test/cctest/test-disasm-ia32.cc |
index fb0c56283f6c388da054a0ad8bcbd280b14bc55c..a2eaa15ed341fd6513ca75ec1e0cd7d130222656 100644 |
--- a/test/cctest/test-disasm-ia32.cc |
+++ b/test/cctest/test-disasm-ia32.cc |
@@ -51,7 +51,7 @@ TEST(DisasmIa320) { |
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) |
@@ -401,6 +401,14 @@ TEST(DisasmIa320) { |
__ xorps(xmm0, Operand(ebx, ecx, times_4, 10000)); |
// Arithmetic operation |
+ __ addss(xmm1, xmm0); |
+ __ addss(xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ mulss(xmm1, xmm0); |
+ __ mulss(xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ subss(xmm1, xmm0); |
+ __ subss(xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ divss(xmm1, xmm0); |
+ __ divss(xmm1, Operand(ebx, ecx, times_4, 10000)); |
__ addps(xmm1, xmm0); |
__ addps(xmm1, Operand(ebx, ecx, times_4, 10000)); |
__ subps(xmm1, xmm0); |
@@ -409,6 +417,9 @@ TEST(DisasmIa320) { |
__ mulps(xmm1, Operand(ebx, ecx, times_4, 10000)); |
__ divps(xmm1, xmm0); |
__ divps(xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ |
+ __ ucomiss(xmm0, xmm1); |
+ __ ucomiss(xmm0, Operand(ebx, ecx, times_4, 10000)); |
} |
{ |
__ cvttss2si(edx, Operand(ebx, ecx, times_4, 10000)); |
@@ -486,6 +497,68 @@ TEST(DisasmIa320) { |
} |
} |
+ // FMA3 instruction |
+ { |
+ if (CpuFeatures::IsSupported(FMA3)) { |
+ CpuFeatureScope scope(&assm, FMA3); |
+ __ vfmadd132sd(xmm0, xmm1, xmm2); |
+ __ vfmadd132sd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfmadd213sd(xmm0, xmm1, xmm2); |
+ __ vfmadd213sd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfmadd231sd(xmm0, xmm1, xmm2); |
+ __ vfmadd231sd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ |
+ __ vfmsub132sd(xmm0, xmm1, xmm2); |
+ __ vfmsub132sd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfmsub213sd(xmm0, xmm1, xmm2); |
+ __ vfmsub213sd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfmsub231sd(xmm0, xmm1, xmm2); |
+ __ vfmsub231sd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ |
+ __ vfnmadd132sd(xmm0, xmm1, xmm2); |
+ __ vfnmadd132sd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfnmadd213sd(xmm0, xmm1, xmm2); |
+ __ vfnmadd213sd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfnmadd231sd(xmm0, xmm1, xmm2); |
+ __ vfnmadd231sd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ |
+ __ vfnmsub132sd(xmm0, xmm1, xmm2); |
+ __ vfnmsub132sd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfnmsub213sd(xmm0, xmm1, xmm2); |
+ __ vfnmsub213sd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfnmsub231sd(xmm0, xmm1, xmm2); |
+ __ vfnmsub231sd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ |
+ __ vfmadd132ss(xmm0, xmm1, xmm2); |
+ __ vfmadd132ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfmadd213ss(xmm0, xmm1, xmm2); |
+ __ vfmadd213ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfmadd231ss(xmm0, xmm1, xmm2); |
+ __ vfmadd231ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ |
+ __ vfmsub132ss(xmm0, xmm1, xmm2); |
+ __ vfmsub132ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfmsub213ss(xmm0, xmm1, xmm2); |
+ __ vfmsub213ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfmsub231ss(xmm0, xmm1, xmm2); |
+ __ vfmsub231ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ |
+ __ vfnmadd132ss(xmm0, xmm1, xmm2); |
+ __ vfnmadd132ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfnmadd213ss(xmm0, xmm1, xmm2); |
+ __ vfnmadd213ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfnmadd231ss(xmm0, xmm1, xmm2); |
+ __ vfnmadd231ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ |
+ __ vfnmsub132ss(xmm0, xmm1, xmm2); |
+ __ vfnmsub132ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfnmsub213ss(xmm0, xmm1, xmm2); |
+ __ vfnmsub213ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ __ vfnmsub231ss(xmm0, xmm1, xmm2); |
+ __ vfnmsub231ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
+ } |
+ } |
+ |
// xchg. |
{ |
__ xchg(eax, eax); |