mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Avoid scratch register collision when comparing an absolute address to an immediate, bug 703047.
This commit is contained in:
parent
fd7a549aaf
commit
44ae4685c4
@ -334,7 +334,7 @@ public:
|
||||
return branch32(cond, left, Imm32(right));
|
||||
}
|
||||
|
||||
Jump branchPtr(Condition cond, AbsoluteAddress left, ImmPtr right)
|
||||
Jump branchPtr(Condition cond, AbsoluteAddress left, ImmPtr right, RegisterID scratch)
|
||||
{
|
||||
return branch32(cond, left, Imm32(right));
|
||||
}
|
||||
|
@ -431,10 +431,10 @@ public:
|
||||
return branchPtr(cond, Address(scratchRegister), right);
|
||||
}
|
||||
|
||||
Jump branchPtr(Condition cond, AbsoluteAddress left, ImmPtr right)
|
||||
Jump branchPtr(Condition cond, AbsoluteAddress left, ImmPtr right, RegisterID scratch)
|
||||
{
|
||||
move(ImmPtr(left.m_ptr), scratchRegister);
|
||||
return branchPtr(cond, Address(scratchRegister), right);
|
||||
move(ImmPtr(left.m_ptr), scratch);
|
||||
return branchPtr(cond, Address(scratch), right);
|
||||
}
|
||||
|
||||
Jump branchPtr(Condition cond, Address left, RegisterID right)
|
||||
|
@ -180,11 +180,13 @@ GeneratePrototypeGuards(JSContext *cx, Vector<JSC::MacroAssembler::Jump,8> &mism
|
||||
types::TypeObject *type = pobj->getType(cx);
|
||||
j = masm.branchPtr(Assembler::NotEqual,
|
||||
AbsoluteAddress(&type->proto),
|
||||
ImmPtr(pobj->getProto()));
|
||||
ImmPtr(pobj->getProto()),
|
||||
scratchReg);
|
||||
} else {
|
||||
j = masm.branchPtr(Assembler::NotEqual,
|
||||
AbsoluteAddress(pobj->addressOfType()),
|
||||
ImmPtr(pobj->type()));
|
||||
ImmPtr(pobj->type()),
|
||||
scratchReg);
|
||||
}
|
||||
if (!mismatches.append(j))
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user