Index: src/x64/macro-assembler-x64.cc |
=================================================================== |
--- src/x64/macro-assembler-x64.cc (revision 7070) |
+++ src/x64/macro-assembler-x64.cc (working copy) |
@@ -95,7 +95,13 @@ |
if (FLAG_debug_code) { |
// Check that the object is not in new space. |
NearLabel not_in_new_space; |
- InNewSpace(object, scratch, not_equal, ¬_in_new_space); |
+ if (addr.is(kScratchRegister)) { |
+ push(kScratchRegister); |
+ InNewSpace(object, scratch, not_equal, ¬_in_new_space); |
+ pop(kScratchRegister); |
+ } else { |
+ InNewSpace(object, scratch, not_equal, ¬_in_new_space); |
+ } |
Abort("new-space object passed to RecordWriteHelper"); |
bind(¬_in_new_space); |
} |