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

Unified Diff: runtime/vm/stub_code_x64.cc

Issue 844903002: Fix debug mac 64 bit build; use far jumps when needed. (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_x64.cc
===================================================================
--- runtime/vm/stub_code_x64.cc (revision 42723)
+++ runtime/vm/stub_code_x64.cc (working copy)
@@ -364,7 +364,12 @@
// R12: address of first argument on stack.
// RBX: address of first argument in array.
Label loop, loop_condition;
- __ jmp(&loop_condition, Assembler::kNearJump);
+#if defined(DEBUG)
+ static const bool kJumpLength = Assembler::kFarJump;
+#else
+ static const bool kJumpLength = Assembler::kNearJump;
+#endif // DEBUG
+ __ jmp(&loop_condition, kJumpLength);
__ Bind(&loop);
__ movq(RDI, Address(R12, 0));
// No generational barrier needed, since array is in new space.
@@ -652,11 +657,16 @@
Label init_loop;
__ Bind(&init_loop);
__ cmpq(RDI, RCX);
- __ j(ABOVE_EQUAL, &done, Assembler::kNearJump);
+#if defined(DEBUG)
+ static const bool kJumpLength = Assembler::kFarJump;
+#else
+ static const bool kJumpLength = Assembler::kNearJump;
+#endif // DEBUG
+ __ j(ABOVE_EQUAL, &done, kJumpLength);
// No generational barrier needed, since we are storing null.
__ InitializeFieldNoBarrier(RAX, Address(RDI, 0), R12);
__ addq(RDI, Immediate(kWordSize));
- __ jmp(&init_loop, Assembler::kNearJump);
+ __ jmp(&init_loop, kJumpLength);
__ Bind(&done);
__ ret(); // returns the newly allocated object in RAX.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698