Bug 1130903 - Avoid calling unboxValue with ScratchDoubleReg, r=jandem.

This commit is contained in:
Brian Hackett 2015-02-09 03:56:02 -07:00
parent 5112c3404f
commit a055c57555

View File

@ -769,10 +769,17 @@ MacroAssembler::storeUnboxedProperty(T address, JSValueType type,
jump(failure);
}
} else {
if (failure)
branchTestNumber(Assembler::NotEqual, value.reg().valueReg(), failure);
unboxValue(value.reg().valueReg(), AnyRegister(ScratchDoubleReg));
ValueOperand reg = value.reg().valueReg();
Label notInt32, end;
branchTestInt32(Assembler::NotEqual, reg, &notInt32);
int32ValueToDouble(reg, ScratchDoubleReg);
storeDouble(ScratchDoubleReg, address);
jump(&end);
bind(&notInt32);
if (failure)
branchTestDouble(Assembler::NotEqual, reg, failure);
storeValue(reg, address);
bind(&end);
}
break;