Index: src/ppc/macro-assembler-ppc.cc |
diff --git a/src/ppc/macro-assembler-ppc.cc b/src/ppc/macro-assembler-ppc.cc |
index f4f58e6c29c7605a9b0aa23e9509d33464037278..381b8e1476e3798adce742625cb06045378bd80b 100644 |
--- a/src/ppc/macro-assembler-ppc.cc |
+++ b/src/ppc/macro-assembler-ppc.cc |
@@ -302,13 +302,10 @@ void MacroAssembler::StoreRoot(Register source, Heap::RootListIndex index, |
void MacroAssembler::InNewSpace(Register object, Register scratch, |
Condition cond, Label* branch) { |
- // N.B. scratch may be same register as object |
DCHECK(cond == eq || cond == ne); |
- mov(r0, Operand(ExternalReference::new_space_mask(isolate()))); |
- and_(scratch, object, r0); |
- mov(r0, Operand(ExternalReference::new_space_start(isolate()))); |
- cmp(scratch, r0); |
- b(cond, branch); |
+ const int mask = |
+ (1 << MemoryChunk::IN_FROM_SPACE) | (1 << MemoryChunk::IN_TO_SPACE); |
+ CheckPageFlag(object, scratch, mask, cond, branch); |
} |