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

Unified Diff: runtime/vm/assembler_ia32_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_ia32.cc ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_ia32_test.cc
diff --git a/runtime/vm/assembler_ia32_test.cc b/runtime/vm/assembler_ia32_test.cc
index a652b8f048c4d4f2b846d6a21ae797225c5750c3..99152cf45bce4975b01388f98d2e3b08e1e13b32 100644
--- a/runtime/vm/assembler_ia32_test.cc
+++ b/runtime/vm/assembler_ia32_test.cc
@@ -1746,6 +1746,34 @@ ASSEMBLER_TEST_RUN(PackedDoubleMax, test) {
}
+ASSEMBLER_TEST_GENERATE(PackedDoubleShuffle, assembler) {
+ static const struct ALIGN16 {
+ double a;
+ double b;
+ } constant0 = { 2.0, 9.0 };
+ __ movups(XMM0, Address::Absolute(reinterpret_cast<uword>(&constant0)));
+ // Splat Y across all lanes.
+ __ shufpd(XMM0, XMM0, Immediate(0x33));
+ // Splat X across all lanes.
+ __ shufpd(XMM0, XMM0, Immediate(0x0));
+ // Set return value.
+ __ pushl(EAX);
+ __ pushl(EAX);
+ __ movsd(Address(ESP, 0), XMM0);
+ __ fldl(Address(ESP, 0));
+ __ popl(EAX);
+ __ popl(EAX);
+ __ 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_ia32.cc ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698