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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b27f0c8d
......@@ -864,10 +864,10 @@ void FastCodeGenerator::EmitVariableAssignment(Assignment* expr) {
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));
......
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