Commit c3fa79ab authored by bak@chromium.org's avatar bak@chromium.org

- Reordered the instructions in the inlined allocation code to space dependent instructions.

- Replaced the or instruction with lea. 

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c114f17e
......@@ -729,13 +729,13 @@ void MacroAssembler::AllocateInNewSpace(int object_size,
cmp(result_end, Operand::StaticVariable(new_space_allocation_limit));
j(above, gc_required, not_taken);
// Update allocation top.
UpdateAllocationTopHelper(result_end, scratch);
// Tag result if requested.
if ((flags & TAG_OBJECT) != 0) {
or_(Operand(result), Immediate(kHeapObjectTag));
lea(result, Operand(result, kHeapObjectTag));
}
// Update allocation top.
UpdateAllocationTopHelper(result_end, scratch);
}
......@@ -759,13 +759,13 @@ void MacroAssembler::AllocateInNewSpace(int header_size,
cmp(result_end, Operand::StaticVariable(new_space_allocation_limit));
j(above, gc_required);
// Update allocation top.
UpdateAllocationTopHelper(result_end, scratch);
// Tag result if requested.
if ((flags & TAG_OBJECT) != 0) {
or_(Operand(result), Immediate(kHeapObjectTag));
lea(result, Operand(result, kHeapObjectTag));
}
// Update allocation top.
UpdateAllocationTopHelper(result_end, scratch);
}
......@@ -790,13 +790,13 @@ void MacroAssembler::AllocateInNewSpace(Register object_size,
cmp(result_end, Operand::StaticVariable(new_space_allocation_limit));
j(above, gc_required, not_taken);
// Update allocation top.
UpdateAllocationTopHelper(result_end, scratch);
// Tag result if requested.
if ((flags & TAG_OBJECT) != 0) {
or_(Operand(result), Immediate(kHeapObjectTag));
lea(result, Operand(result, kHeapObjectTag));
}
// Update allocation top.
UpdateAllocationTopHelper(result_end, scratch);
}
......
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