Index: src/arm/macro-assembler-arm.cc |
=================================================================== |
--- src/arm/macro-assembler-arm.cc (revision 7041) |
+++ src/arm/macro-assembler-arm.cc (working copy) |
@@ -1537,6 +1537,14 @@ |
} |
+void MacroAssembler::CompareRoot(Register obj, |
+ Heap::RootListIndex index) { |
+ ASSERT(!obj.is(ip)); |
+ LoadRoot(ip, index); |
+ cmp(obj, ip); |
+} |
+ |
+ |
void MacroAssembler::CheckMap(Register obj, |
Register scratch, |
Handle<Map> map, |
@@ -2342,9 +2350,7 @@ |
void MacroAssembler::AbortIfNotRootValue(Register src, |
Heap::RootListIndex root_value_index, |
const char* message) { |
- ASSERT(!src.is(ip)); |
- LoadRoot(ip, root_value_index); |
- cmp(src, ip); |
+ CompareRoot(src, root_value_index); |
Assert(eq, message); |
} |