Revision: 3520 Author: [email protected] Date: Wed Dec 23 05:27:58 2009 Log: - 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 http://code.google.com/p/v8/source/detail?r=3520 Modified: /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc ======================================= --- /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc Tue Dec 22 05:07:27 2009 +++ /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc Wed Dec 23 05:27:58 2009 @@ -729,13 +729,13 @@ 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 @@ 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 @@ 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); } -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
