mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1012694 - IonMonkey (ARM): Use the second scratch register to avoid clobbering the scratch register. r=dougc
This commit is contained in:
parent
73856d82d4
commit
b07c849ebf
@ -895,8 +895,9 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
||||
if (lhs.getTag() == Operand::OP2) {
|
||||
branch32(cond, lhs.toReg(), rhs, label);
|
||||
} else {
|
||||
ma_ldr(lhs, ScratchRegister);
|
||||
branch32(cond, ScratchRegister, rhs, label);
|
||||
// branch32 will use ScratchRegister.
|
||||
ma_ldr(lhs, secondScratchReg_);
|
||||
branch32(cond, secondScratchReg_, rhs, label);
|
||||
}
|
||||
}
|
||||
void branch32(Condition cond, const Address &lhs, Register rhs, Label *label) {
|
||||
@ -904,8 +905,9 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
||||
branch32(cond, ScratchRegister, rhs, label);
|
||||
}
|
||||
void branch32(Condition cond, const Address &lhs, Imm32 rhs, Label *label) {
|
||||
load32(lhs, ScratchRegister);
|
||||
branch32(cond, ScratchRegister, rhs, label);
|
||||
// branch32 will use ScratchRegister.
|
||||
load32(lhs, secondScratchReg_);
|
||||
branch32(cond, secondScratchReg_, rhs, label);
|
||||
}
|
||||
void branchPtr(Condition cond, const Address &lhs, Register rhs, Label *label) {
|
||||
branch32(cond, lhs, rhs, label);
|
||||
@ -1000,12 +1002,14 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
||||
ma_b(label, cond);
|
||||
}
|
||||
void branchTest32(Condition cond, const Address &address, Imm32 imm, Label *label) {
|
||||
ma_ldr(Operand(address.base, address.offset), ScratchRegister);
|
||||
branchTest32(cond, ScratchRegister, imm, label);
|
||||
// branchTest32 will use ScratchRegister.
|
||||
load32(address, secondScratchReg_);
|
||||
branchTest32(cond, secondScratchReg_, imm, label);
|
||||
}
|
||||
void branchTest32(Condition cond, AbsoluteAddress address, Imm32 imm, Label *label) {
|
||||
loadPtr(address, ScratchRegister);
|
||||
branchTest32(cond, ScratchRegister, imm, label);
|
||||
// branchTest32 will use ScratchRegister.
|
||||
load32(address, secondScratchReg_);
|
||||
branchTest32(cond, secondScratchReg_, imm, label);
|
||||
}
|
||||
void branchTestPtr(Condition cond, Register lhs, Register rhs, Label *label) {
|
||||
branchTest32(cond, lhs, rhs, label);
|
||||
|
Loading…
Reference in New Issue
Block a user