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

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

Issue 757503002: [x64] Introduce FMA3 instructions on scalar data elements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove avx_os_support Created 6 years, 1 month 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-x64.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-x64.cc
diff --git a/test/cctest/test-disasm-x64.cc b/test/cctest/test-disasm-x64.cc
index fac9226279d7833fa72e386d05c5ebb7d4fe6d03..2ff1c93a5719d54990d7710f54657bcb8f972542 100644
--- a/test/cctest/test-disasm-x64.cc
+++ b/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,74 @@ TEST(DisasmX64) {
}
}
+ // 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);
« no previous file with comments | « test/cctest/test-assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698