mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 22:25:30 +00:00
Bug 658968 - Don't clobber Registers::ReturnReg in emitStubCmpOp and jsop_relational_double. r=dvander
This commit is contained in:
parent
b725177be5
commit
ae9c7ee1ba
13
js/src/jit-test/tests/jaeger/bug658968.js
Normal file
13
js/src/jit-test/tests/jaeger/bug658968.js
Normal file
@ -0,0 +1,13 @@
|
||||
function f(){
|
||||
var tarr = [];
|
||||
var elemArray = [
|
||||
{name: "C0", checked: true},
|
||||
{name: "C1", checked: false},
|
||||
];
|
||||
for (var i = 0; i < elemArray.length; i++) {
|
||||
var element = elemArray[i];
|
||||
tarr[i] = (element.checked == true) ? 1 : 2;
|
||||
}
|
||||
assertEq(tarr.join(""), "12");
|
||||
}
|
||||
f();
|
@ -2941,11 +2941,10 @@ mjit::Compiler::emitStubCmpOp(BoolStub stub, jsbytecode *target, JSOp fused)
|
||||
{
|
||||
prepareStubCall(Uses(2));
|
||||
INLINE_STUBCALL(stub);
|
||||
frame.pop();
|
||||
frame.pop();
|
||||
frame.popn(2);
|
||||
frame.takeReg(Registers::ReturnReg);
|
||||
|
||||
if (!target) {
|
||||
frame.takeReg(Registers::ReturnReg);
|
||||
frame.pushTypedPayload(JSVAL_TYPE_BOOLEAN, Registers::ReturnReg);
|
||||
return true;
|
||||
}
|
||||
|
@ -1298,6 +1298,7 @@ mjit::Compiler::jsop_relational_double(JSOp op, BoolStub stub, jsbytecode *targe
|
||||
OOL_STUBCALL(stub);
|
||||
|
||||
frame.popn(2);
|
||||
frame.takeReg(Registers::ReturnReg);
|
||||
frame.syncAndForgetEverything();
|
||||
|
||||
Jump j = masm.branchDouble(dblCond, fpLeft, fpRight);
|
||||
|
Loading…
Reference in New Issue
Block a user