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

Unified Diff: runtime/vm/assembler_ia32_test.cc

Issue 23129014: Add packed add and subtract to IA32 and X64 assemblers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 3a7d4a55df1e235e92c46db7c6ec0f945e7316d0..2f3087f7c48fe9db5386e062ee1e2fad87a41ba9 100644
--- a/runtime/vm/assembler_ia32_test.cc
+++ b/runtime/vm/assembler_ia32_test.cc
@@ -874,6 +874,31 @@ ASSEMBLER_TEST_RUN(PackedFPOperations, test) {
}
+ASSEMBLER_TEST_GENERATE(PackedIntOperations, assembler) {
+ __ movl(EAX, Immediate(0x2));
+ __ movd(XMM0, EAX);
+ __ shufps(XMM0, XMM0, Immediate(0x0));
+ __ movl(EAX, Immediate(0x1));
+ __ movd(XMM1, EAX);
+ __ shufps(XMM1, XMM1, Immediate(0x0));
+ __ addpl(XMM0, XMM1); // 0x3
+ __ addpl(XMM0, XMM0); // 0x6
+ __ subpl(XMM0, XMM1); // 0x5
+ // Copy the low lane at ESP.
+ __ pushl(EAX);
+ __ movss(Address(ESP, 0), XMM0);
+ __ popl(EAX);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(PackedIntOperations, test) {
+ typedef uint32_t (*PackedIntOperationsCode)();
+ uint32_t res = reinterpret_cast<PackedIntOperationsCode>(test->entry())();
+ EXPECT_EQ(static_cast<uword>(0x5), res);
+}
+
+
ASSEMBLER_TEST_GENERATE(PackedFPOperations2, assembler) {
__ movl(EAX, Immediate(bit_cast<int32_t, float>(4.0f)));
__ movd(XMM0, EAX);
« 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