Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 848ec7d1bf6d178ca2156563a2312290b58c4264..542ad031bd4182ce0d40c45ac71adefb51f1d920 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -452,9 +452,9 @@ void MacroAssembler::InNewSpace(Register object, |
Condition cond, |
Label* branch) { |
DCHECK(cond == eq || cond == ne); |
- and_(scratch, object, Operand(ExternalReference::new_space_mask(isolate()))); |
- cmp(scratch, Operand(ExternalReference::new_space_start(isolate()))); |
- b(cond, branch); |
+ const int mask = |
+ (1 << MemoryChunk::IN_FROM_SPACE) | (1 << MemoryChunk::IN_TO_SPACE); |
+ CheckPageFlag(object, scratch, mask, cond, branch); |
} |
@@ -3313,6 +3313,7 @@ void MacroAssembler::CheckPageFlag( |
int mask, |
Condition cc, |
Label* condition_met) { |
+ DCHECK(cc == eq || cc == ne); |
Bfc(scratch, object, 0, kPageSizeBits); |
ldr(scratch, MemOperand(scratch, MemoryChunk::kFlagsOffset)); |
tst(scratch, Operand(mask)); |