Don't clobber callee-save register when testing pushed value after stub calls, bug 687856. r=dvander

This commit is contained in:
Brian Hackett 2011-09-20 20:14:28 -07:00
parent c1be77aca6
commit 4f83e99a93

View File

@ -1148,7 +1148,7 @@ static const JSC::MacroAssembler::RegisterID JSParamReg_Argc = JSC::SparcRegist
/*
* Generate code testing whether an in memory value at address has a type
* in the specified set. Updates mismatches with any failure jumps. Assumes
* no data registers are live.
* that no temporary (caller save) registers are live.
*/
bool generateTypeCheck(JSContext *cx, Address address,
types::TypeSet *types, Vector<Jump> *mismatches)
@ -1198,8 +1198,7 @@ static const JSC::MacroAssembler::RegisterID JSParamReg_Argc = JSC::SparcRegist
if (count != 0) {
if (!mismatches->append(testObject(Assembler::NotEqual, address)))
return false;
Registers tempRegs(Registers::AvailRegs);
RegisterID reg = tempRegs.takeAnyReg().reg();
RegisterID reg = Registers::ArgReg1;
loadPayload(address, reg);