Revision: 3299 Author: [email protected] Date: Fri Nov 13 01:51:49 2009 Log: Fixes bug in the top-level compiler with the write barrier for assignments to context slots:
The test for a SMI before the write barrier tested the wrong register: r0 = target context address r1 = value to be written This change fixes the SMI test and tests r1 instead of r0. Review URL: http://codereview.chromium.org/384085 http://code.google.com/p/v8/source/detail?r=3299 Modified: /branches/bleeding_edge/src/arm/fast-codegen-arm.cc ======================================= --- /branches/bleeding_edge/src/arm/fast-codegen-arm.cc Fri Nov 13 01:42:18 2009 +++ /branches/bleeding_edge/src/arm/fast-codegen-arm.cc Fri Nov 13 01:51:49 2009 @@ -864,10 +864,10 @@ int offset = FixedArray::kHeaderSize + slot->index() * kPointerSize; // Update the write barrier for the array store with r0 as the scratch - // register. Skip the write barrier if r0 is a smi. + // register. Skip the write barrier if the value written (r1) is a smi. // The smi test is part of RecordWrite on other platforms, not on arm. Label exit; - __ tst(r0, Operand(kSmiTagMask)); + __ tst(r1, Operand(kSmiTagMask)); __ b(eq, &exit); __ mov(r2, Operand(offset)); --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
