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

Unified Diff: runtime/vm/assembler_x64_test.cc

Issue 12545067: On x64 use 32bit idiv when possible instead of 64bit one. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rename movsxl to movsxd Created 7 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_x64.cc ('k') | runtime/vm/disassembler_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
diff --git a/runtime/vm/assembler_x64_test.cc b/runtime/vm/assembler_x64_test.cc
index 1287571390502b17f76b85497edbc4bc013172fe..2d29d9debb23edbe3be363c49f8d0bec87f913a0 100644
--- a/runtime/vm/assembler_x64_test.cc
+++ b/runtime/vm/assembler_x64_test.cc
@@ -515,6 +515,22 @@ ASSEMBLER_TEST_RUN(MoveExtend, test) {
}
+ASSEMBLER_TEST_GENERATE(MoveExtend32, assembler) {
+ __ movq(RDX, Immediate(0xffffffff));
+ __ movsxd(RDX, RDX);
+ __ movq(RAX, Immediate(0x7fffffff));
+ __ movsxd(RAX, RAX);
+ __ addq(RAX, RDX);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(MoveExtend32, test) {
+ typedef intptr_t (*MoveExtend)();
+ EXPECT_EQ(0x7ffffffe, reinterpret_cast<MoveExtend>(test->entry())());
+}
+
+
ASSEMBLER_TEST_GENERATE(MoveExtendMemory, assembler) {
__ movq(RDX, Immediate(0x123456781234ffff));
@@ -537,6 +553,24 @@ ASSEMBLER_TEST_RUN(MoveExtendMemory, test) {
}
+ASSEMBLER_TEST_GENERATE(MoveExtend32Memory, assembler) {
+ __ pushq(Immediate(0xffffffff));
+ __ pushq(Immediate(0x7fffffff));
+ __ movsxd(RDX, Address(RSP, kWordSize));
+ __ movsxd(RAX, Address(RSP, 0));
+ __ addq(RSP, Immediate(kWordSize * 2));
+
+ __ addq(RAX, RDX);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(MoveExtend32Memory, test) {
+ typedef intptr_t (*MoveExtend)();
+ EXPECT_EQ(0x7ffffffe, reinterpret_cast<MoveExtend>(test->entry())());
+}
+
+
ASSEMBLER_TEST_GENERATE(MoveWord, assembler) {
__ xorq(RAX, RAX);
__ pushq(Immediate(0));
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/disassembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698