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

Unified Diff: runtime/vm/assembler_x64_test.cc

Issue 869533003: VM: Emit compacter code for x64 branches to external labels. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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/instructions_x64.h » ('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 43070)
+++ runtime/vm/assembler_x64_test.cc (working copy)
@@ -1808,6 +1808,20 @@
}
+ASSEMBLER_TEST_GENERATE(JumpIndirect, assembler) {
+ ExternalLabel call1(reinterpret_cast<uword>(LeafReturn42));
+ __ movq(Address(CallingConventions::kArg1Reg, 0), Immediate(call1.address()));
+ __ jmp(Address(CallingConventions::kArg1Reg, 0));
+}
+
+
+ASSEMBLER_TEST_RUN(JumpIndirect, test) {
+ uword temp = 0;
+ typedef int (*JumpIndirect)(uword*);
+ EXPECT_EQ(42, reinterpret_cast<JumpIndirect>(test->entry())(&temp));
+}
+
+
ASSEMBLER_TEST_GENERATE(SingleFPMoves, assembler) {
__ movq(RAX, Immediate(bit_cast<int32_t, float>(234.0f)));
__ movd(XMM0, RAX);
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/instructions_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698