Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1533)

Unified Diff: test/cctest/test-disasm-ia32.cc

Issue 773783002: [ia32] Introduce FMA3 instructions on scalar data elements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-assembler-ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « test/cctest/test-assembler-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698