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

Unified Diff: runtime/vm/assembler_x64_test.cc

Issue 183923026: Inline of Float64x2 operations round 1 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months 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 | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/disassembler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64_test.cc
diff --git a/runtime/vm/assembler_x64_test.cc b/runtime/vm/assembler_x64_test.cc
index 38567f0cefe28065dea29e1ffd239ffc7f994893..8892ed40eae65e14af257e89916bd680bf7a67ec 100644
--- a/runtime/vm/assembler_x64_test.cc
+++ b/runtime/vm/assembler_x64_test.cc
@@ -1638,6 +1638,30 @@ ASSEMBLER_TEST_RUN(PackedDoubleMax, test) {
}
+ASSEMBLER_TEST_GENERATE(PackedDoubleShuffle, assembler) {
+ static const struct ALIGN16 {
+ double a;
+ double b;
+ } constant0 = { 2.0, 9.0 };
+ __ movq(RAX, Immediate(reinterpret_cast<uword>(&constant0)));
+ __ movups(XMM10, Address(RAX, 0));
+ // Splat Y across all lanes.
+ __ shufpd(XMM10, XMM10, Immediate(0x33));
+ // Splat X across all lanes.
+ __ shufpd(XMM10, XMM10, Immediate(0x0));
+ // Set return value.
+ __ movaps(XMM0, XMM10);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(PackedDoubleShuffle, test) {
+ typedef double (*PackedDoubleShuffle)();
+ double res = reinterpret_cast<PackedDoubleShuffle>(test->entry())();
+ EXPECT_FLOAT_EQ(9.0, res, 0.000001f);
+}
+
+
ASSEMBLER_TEST_GENERATE(PackedDoubleToSingle, assembler) {
static const struct ALIGN16 {
double a;
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/disassembler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698