Commit 5a40de9b authored by whesse@chromium.org's avatar whesse@chromium.org

Add new ARM macro assembler function CompareRoot left out of previous commit.

Review URL: http://codereview.chromium.org/6614015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8ff91650
...@@ -1537,6 +1537,14 @@ void MacroAssembler::CompareInstanceType(Register map, ...@@ -1537,6 +1537,14 @@ void MacroAssembler::CompareInstanceType(Register map,
} }
void MacroAssembler::CompareRoot(Register obj,
Heap::RootListIndex index) {
ASSERT(!obj.is(ip));
LoadRoot(ip, index);
cmp(obj, ip);
}
void MacroAssembler::CheckMap(Register obj, void MacroAssembler::CheckMap(Register obj,
Register scratch, Register scratch,
Handle<Map> map, Handle<Map> map,
...@@ -2342,9 +2350,7 @@ void MacroAssembler::AbortIfNotString(Register object) { ...@@ -2342,9 +2350,7 @@ void MacroAssembler::AbortIfNotString(Register object) {
void MacroAssembler::AbortIfNotRootValue(Register src, void MacroAssembler::AbortIfNotRootValue(Register src,
Heap::RootListIndex root_value_index, Heap::RootListIndex root_value_index,
const char* message) { const char* message) {
ASSERT(!src.is(ip)); CompareRoot(src, root_value_index);
LoadRoot(ip, root_value_index);
cmp(src, ip);
Assert(eq, message); Assert(eq, message);
} }
......
...@@ -577,6 +577,11 @@ class MacroAssembler: public Assembler { ...@@ -577,6 +577,11 @@ class MacroAssembler: public Assembler {
bool is_heap_object); bool is_heap_object);
// Compare the object in a register to a value from the root list.
// Uses the ip register as scratch.
void CompareRoot(Register obj, Heap::RootListIndex index);
// Load and check the instance type of an object for being a string. // Load and check the instance type of an object for being a string.
// Loads the type into the second argument register. // Loads the type into the second argument register.
// Returns a condition that will be enabled if the object was a string. // Returns a condition that will be enabled if the object was a string.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment