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

Unified Diff: runtime/vm/assembler_x64_test.cc

Issue 8818001: Add 64-bit stubs to call into the runtime and to call native functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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/code_generator.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 2205)
+++ runtime/vm/assembler_x64_test.cc (working copy)
@@ -38,92 +38,168 @@
__ movq(RAX, Address(RBP, 0));
__ movq(RAX, Address(RAX, 0));
__ movq(RAX, Address(R10, 0));
+ __ movq(RAX, Address(R12, 0));
+ __ movq(RAX, Address(R13, 0));
__ movq(R10, Address(RAX, 0));
__ movq(RAX, Address(RSP, kWordSize));
__ movq(RAX, Address(RBP, kWordSize));
__ movq(RAX, Address(RAX, kWordSize));
__ movq(RAX, Address(R10, kWordSize));
+ __ movq(RAX, Address(R12, kWordSize));
+ __ movq(RAX, Address(R13, kWordSize));
__ movq(RAX, Address(RSP, -kWordSize));
__ movq(RAX, Address(RBP, -kWordSize));
__ movq(RAX, Address(RAX, -kWordSize));
__ movq(RAX, Address(R10, -kWordSize));
+ __ movq(RAX, Address(R12, -kWordSize));
+ __ movq(RAX, Address(R13, -kWordSize));
__ movq(RAX, Address(RSP, 256 * kWordSize));
__ movq(RAX, Address(RBP, 256 * kWordSize));
__ movq(RAX, Address(RAX, 256 * kWordSize));
__ movq(RAX, Address(R10, 256 * kWordSize));
+ __ movq(RAX, Address(R12, 256 * kWordSize));
+ __ movq(RAX, Address(R13, 256 * kWordSize));
__ movq(RAX, Address(RSP, -256 * kWordSize));
__ movq(RAX, Address(RBP, -256 * kWordSize));
__ movq(RAX, Address(RAX, -256 * kWordSize));
__ movq(RAX, Address(R10, -256 * kWordSize));
+ __ movq(RAX, Address(R12, -256 * kWordSize));
+ __ movq(RAX, Address(R13, -256 * kWordSize));
- __ movq(RAX, Address(RAX, TIMES_1));
- __ movq(RAX, Address(RAX, TIMES_2));
- __ movq(RAX, Address(RAX, TIMES_4));
- __ movq(RAX, Address(RAX, TIMES_8));
+ __ movq(RAX, Address(RAX, TIMES_1, 0));
+ __ movq(RAX, Address(RAX, TIMES_2, 0));
+ __ movq(RAX, Address(RAX, TIMES_4, 0));
+ __ movq(RAX, Address(RAX, TIMES_8, 0));
- __ movq(RAX, Address(RBP, TIMES_2));
- __ movq(RAX, Address(RAX, TIMES_2));
- __ movq(RAX, Address(R10, TIMES_2));
+ __ movq(RAX, Address(RBP, TIMES_2, 0));
+ __ movq(RAX, Address(RAX, TIMES_2, 0));
+ __ movq(RAX, Address(R10, TIMES_2, 0));
+ __ movq(RAX, Address(R12, TIMES_2, 0));
+ __ movq(RAX, Address(R13, TIMES_2, 0));
__ movq(RAX, Address(RBP, TIMES_2, kWordSize));
__ movq(RAX, Address(RAX, TIMES_2, kWordSize));
__ movq(RAX, Address(R10, TIMES_2, kWordSize));
+ __ movq(RAX, Address(R12, TIMES_2, kWordSize));
+ __ movq(RAX, Address(R13, TIMES_2, kWordSize));
__ movq(RAX, Address(RBP, TIMES_2, 256 * kWordSize));
__ movq(RAX, Address(RAX, TIMES_2, 256 * kWordSize));
__ movq(RAX, Address(R10, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(R12, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(R13, TIMES_2, 256 * kWordSize));
__ movq(RAX, Address(RAX, RBP, TIMES_2, 0));
__ movq(RAX, Address(RAX, RAX, TIMES_2, 0));
__ movq(RAX, Address(RAX, R10, TIMES_2, 0));
+ __ movq(RAX, Address(RAX, R12, TIMES_2, 0));
+ __ movq(RAX, Address(RAX, R13, TIMES_2, 0));
__ movq(RAX, Address(RBP, RBP, TIMES_2, 0));
__ movq(RAX, Address(RBP, RAX, TIMES_2, 0));
__ movq(RAX, Address(RBP, R10, TIMES_2, 0));
+ __ movq(RAX, Address(RBP, R12, TIMES_2, 0));
+ __ movq(RAX, Address(RBP, R13, TIMES_2, 0));
__ movq(RAX, Address(RSP, RBP, TIMES_2, 0));
__ movq(RAX, Address(RSP, RAX, TIMES_2, 0));
__ movq(RAX, Address(RSP, R10, TIMES_2, 0));
+ __ movq(RAX, Address(RSP, R12, TIMES_2, 0));
+ __ movq(RAX, Address(RSP, R13, TIMES_2, 0));
__ movq(RAX, Address(R10, RBP, TIMES_2, 0));
__ movq(RAX, Address(R10, RAX, TIMES_2, 0));
__ movq(RAX, Address(R10, R10, TIMES_2, 0));
+ __ movq(RAX, Address(R10, R12, TIMES_2, 0));
+ __ movq(RAX, Address(R10, R13, TIMES_2, 0));
+ __ movq(RAX, Address(R12, RBP, TIMES_2, 0));
+ __ movq(RAX, Address(R12, RAX, TIMES_2, 0));
+ __ movq(RAX, Address(R12, R10, TIMES_2, 0));
+ __ movq(RAX, Address(R12, R12, TIMES_2, 0));
+ __ movq(RAX, Address(R12, R13, TIMES_2, 0));
+
+ __ movq(RAX, Address(R13, RBP, TIMES_2, 0));
+ __ movq(RAX, Address(R13, RAX, TIMES_2, 0));
+ __ movq(RAX, Address(R13, R10, TIMES_2, 0));
+ __ movq(RAX, Address(R13, R12, TIMES_2, 0));
+ __ movq(RAX, Address(R13, R13, TIMES_2, 0));
+
__ movq(RAX, Address(RAX, RBP, TIMES_2, kWordSize));
__ movq(RAX, Address(RAX, RAX, TIMES_2, kWordSize));
__ movq(RAX, Address(RAX, R10, TIMES_2, kWordSize));
+ __ movq(RAX, Address(RAX, R12, TIMES_2, kWordSize));
+ __ movq(RAX, Address(RAX, R13, TIMES_2, kWordSize));
__ movq(RAX, Address(RBP, RBP, TIMES_2, kWordSize));
__ movq(RAX, Address(RBP, RAX, TIMES_2, kWordSize));
__ movq(RAX, Address(RBP, R10, TIMES_2, kWordSize));
+ __ movq(RAX, Address(RBP, R12, TIMES_2, kWordSize));
+ __ movq(RAX, Address(RBP, R13, TIMES_2, kWordSize));
__ movq(RAX, Address(RSP, RBP, TIMES_2, kWordSize));
__ movq(RAX, Address(RSP, RAX, TIMES_2, kWordSize));
__ movq(RAX, Address(RSP, R10, TIMES_2, kWordSize));
+ __ movq(RAX, Address(RSP, R12, TIMES_2, kWordSize));
+ __ movq(RAX, Address(RSP, R13, TIMES_2, kWordSize));
__ movq(RAX, Address(R10, RBP, TIMES_2, kWordSize));
__ movq(RAX, Address(R10, RAX, TIMES_2, kWordSize));
__ movq(RAX, Address(R10, R10, TIMES_2, kWordSize));
+ __ movq(RAX, Address(R10, R12, TIMES_2, kWordSize));
+ __ movq(RAX, Address(R10, R13, TIMES_2, kWordSize));
+ __ movq(RAX, Address(R12, RBP, TIMES_2, kWordSize));
+ __ movq(RAX, Address(R12, RAX, TIMES_2, kWordSize));
+ __ movq(RAX, Address(R12, R10, TIMES_2, kWordSize));
+ __ movq(RAX, Address(R12, R12, TIMES_2, kWordSize));
+ __ movq(RAX, Address(R12, R13, TIMES_2, kWordSize));
+
+ __ movq(RAX, Address(R13, RBP, TIMES_2, kWordSize));
+ __ movq(RAX, Address(R13, RAX, TIMES_2, kWordSize));
+ __ movq(RAX, Address(R13, R10, TIMES_2, kWordSize));
+ __ movq(RAX, Address(R13, R12, TIMES_2, kWordSize));
+ __ movq(RAX, Address(R13, R13, TIMES_2, kWordSize));
+
__ movq(RAX, Address(RAX, RBP, TIMES_2, 256 * kWordSize));
__ movq(RAX, Address(RAX, RAX, TIMES_2, 256 * kWordSize));
__ movq(RAX, Address(RAX, R10, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(RAX, R12, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(RAX, R13, TIMES_2, 256 * kWordSize));
__ movq(RAX, Address(RBP, RBP, TIMES_2, 256 * kWordSize));
__ movq(RAX, Address(RBP, RAX, TIMES_2, 256 * kWordSize));
__ movq(RAX, Address(RBP, R10, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(RBP, R12, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(RBP, R13, TIMES_2, 256 * kWordSize));
__ movq(RAX, Address(RSP, RBP, TIMES_2, 256 * kWordSize));
__ movq(RAX, Address(RSP, RAX, TIMES_2, 256 * kWordSize));
__ movq(RAX, Address(RSP, R10, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(RSP, R12, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(RSP, R13, TIMES_2, 256 * kWordSize));
__ movq(RAX, Address(R10, RBP, TIMES_2, 256 * kWordSize));
__ movq(RAX, Address(R10, RAX, TIMES_2, 256 * kWordSize));
__ movq(RAX, Address(R10, R10, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(R10, R12, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(R10, R13, TIMES_2, 256 * kWordSize));
+
+ __ movq(RAX, Address(R12, RBP, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(R12, RAX, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(R12, R10, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(R12, R12, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(R12, R13, TIMES_2, 256 * kWordSize));
+
+ __ movq(RAX, Address(R13, RBP, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(R13, RAX, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(R13, R10, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(R13, R12, TIMES_2, 256 * kWordSize));
+ __ movq(RAX, Address(R13, R13, TIMES_2, 256 * kWordSize));
}
@@ -269,6 +345,24 @@
}
+ASSEMBLER_TEST_GENERATE(SignedMultiply64, assembler) {
+ __ movq(RAX, Immediate(2));
+ __ movq(RCX, Immediate(4));
+ __ imulq(RAX, RCX);
+ __ movq(R8, Immediate(2));
+ __ movq(R9, Immediate(4));
+ __ imulq(R8, R9);
+ __ addq(RAX, R8);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(SignedMultiply64, entry) {
+ typedef int64_t (*SignedMultiply64)();
+ EXPECT_EQ(16, reinterpret_cast<SignedMultiply64>(entry)());
+}
+
+
static const int64_t kLargeConstant = 0x1234567887654321;
static const int64_t kAnotherLargeConstant = 987654321987654321LL;
static const int64_t kProductLargeConstants = 0x5bbb29a7f52fbbd1;
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698