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

Unified Diff: runtime/vm/assembler_x64_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_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 7fe6a0862a0f1799dbf4d0c0033c0fffb4ff319e..a735324d860cfcf27b558a4ea5374622e57275a9 100644
--- a/runtime/vm/assembler_x64_test.cc
+++ b/runtime/vm/assembler_x64_test.cc
@@ -1449,6 +1449,30 @@ ASSEMBLER_TEST_RUN(PackedFPOperations, test) {
}
+ASSEMBLER_TEST_GENERATE(PackedIntOperations, assembler) {
+ __ movl(RAX, Immediate(0x2));
+ __ movd(XMM0, RAX);
+ __ shufps(XMM0, XMM0, Immediate(0x0));
+ __ movl(RAX, Immediate(0x1));
+ __ movd(XMM1, RAX);
+ __ shufps(XMM1, XMM1, Immediate(0x0));
+ __ addpl(XMM0, XMM1); // 0x3
+ __ addpl(XMM0, XMM0); // 0x6
+ __ subpl(XMM0, XMM1); // 0x5
+ __ pushq(RAX);
+ __ movss(Address(RSP, 0), XMM0);
+ __ popq(RAX);
+ __ 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) {
__ movq(RAX, Immediate(bit_cast<int32_t, float>(4.0f)));
__ movd(XMM0, RAX);
« 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