Fix bug in register assignment of IsObjectAndBranch.

Make sure that input and temp registers don't overlap.
Review URL: http://codereview.chromium.org/7273026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3f6043d3
......@@ -1098,7 +1098,7 @@ LInstruction* LChunkBuilder::DoTest(HTest* instr) {
HIsObject* compare = HIsObject::cast(v);
ASSERT(compare->value()->representation().IsTagged());
LOperand* temp = TempRegister();
return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), temp);
return new LIsObjectAndBranch(UseRegister(compare->value()), temp);
} else if (v->IsCompareObjectEq()) {
HCompareObjectEq* compare = HCompareObjectEq::cast(v);
return new LCmpObjectEqAndBranch(UseRegisterAtStart(compare->left()),
......
......@@ -1098,7 +1098,7 @@ LInstruction* LChunkBuilder::DoTest(HTest* instr) {
ASSERT(compare->value()->representation().IsTagged());
LOperand* temp1 = TempRegister();
LOperand* temp2 = TempRegister();
return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()),
return new LIsObjectAndBranch(UseRegister(compare->value()),
temp1,
temp2);
} else if (v->IsCompareObjectEq()) {
......
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