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; |