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

Unified Diff: runtime/vm/assembler_x64_test.cc

Issue 10451026: More intrinsification x64: array index load and store. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/intrinsifier_x64.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
===================================================================
--- runtime/vm/assembler_x64_test.cc (revision 7968)
+++ runtime/vm/assembler_x64_test.cc (working copy)
@@ -1211,6 +1211,29 @@
EXPECT_EQ(16, res); // 16 bytes emitted.
}
+
+ASSEMBLER_TEST_GENERATE(TestAdds, assembler) {
+ __ movq(RAX, Immediate(4));
+ __ pushq(RAX);
+ __ addq(Address(RSP, 0), Immediate(5));
+ // TOS: 9
+ __ addq(Address(RSP, 0), Immediate(-2));
+ // TOS: 7
+ __ movq(RCX, Immediate(3));
+ __ addq(Address(RSP, 0), RCX);
+ // TOS: 10
+ __ popq(RAX);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(TestAdds, entry) {
+ typedef int (*TestAdds)();
+ int res = reinterpret_cast<TestAdds>(entry)();
+ EXPECT_EQ(10, res);
+}
+
+
} // namespace dart
#endif // defined TARGET_ARCH_X64
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698