mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 891119 - IonMonkey: Simplify RegisterSet usage by using takeUnchecked instead of has and take. r=h4writer
This commit is contained in:
parent
f79fced3ea
commit
42bd555de0
@ -3960,12 +3960,9 @@ ICGetElem_Arguments::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
// unlikely.
|
||||
Label failureReconstructInputs;
|
||||
regs = availableGeneralRegs(0);
|
||||
if (regs.has(objReg))
|
||||
regs.take(objReg);
|
||||
if (regs.has(idxReg))
|
||||
regs.take(idxReg);
|
||||
if (regs.has(scratchReg))
|
||||
regs.take(scratchReg);
|
||||
regs.takeUnchecked(objReg);
|
||||
regs.takeUnchecked(idxReg);
|
||||
regs.takeUnchecked(scratchReg);
|
||||
Register argData = regs.takeAny();
|
||||
Register tempReg = regs.takeAny();
|
||||
|
||||
@ -7233,8 +7230,7 @@ ICCallScriptedCompiler::generateStubCode(MacroAssembler &masm)
|
||||
|
||||
regs.take(argcReg);
|
||||
regs.take(ArgumentsRectifierReg);
|
||||
if (regs.has(BaselineTailCallReg))
|
||||
regs.take(BaselineTailCallReg);
|
||||
regs.takeUnchecked(BaselineTailCallReg);
|
||||
|
||||
// Load the callee in R1.
|
||||
// Stack Layout: [ ..., CalleeVal, ThisVal, Arg0Val, ..., ArgNVal, +ICStackValueOffset+ ]
|
||||
|
@ -1329,8 +1329,7 @@ CodeGenerator::visitOutOfLineCallPostWriteBarrier(OutOfLineCallPostWriteBarrier
|
||||
masm.movePtr(ImmGCPtr(&obj->toConstant()->toObject()), objreg);
|
||||
} else {
|
||||
objreg = ToRegister(obj);
|
||||
if (regs.has(objreg))
|
||||
regs.take(objreg);
|
||||
regs.takeUnchecked(objreg);
|
||||
}
|
||||
|
||||
Register runtimereg = regs.takeAny();
|
||||
|
@ -593,26 +593,23 @@ class RegisterSet {
|
||||
}
|
||||
|
||||
void maybeTake(Register reg) {
|
||||
if (gpr_.has(reg))
|
||||
gpr_.take(reg);
|
||||
gpr_.takeUnchecked(reg);
|
||||
}
|
||||
void maybeTake(FloatRegister reg) {
|
||||
if (fpu_.has(reg))
|
||||
fpu_.take(reg);
|
||||
fpu_.takeUnchecked(reg);
|
||||
}
|
||||
void maybeTake(AnyRegister reg) {
|
||||
if (has(reg))
|
||||
take(reg);
|
||||
if (reg.isFloat())
|
||||
fpu_.takeUnchecked(reg.fpu());
|
||||
else
|
||||
gpr_.takeUnchecked(reg.gpr());
|
||||
}
|
||||
void maybeTake(ValueOperand value) {
|
||||
#if defined(JS_NUNBOX32)
|
||||
if (gpr_.has(value.typeReg()))
|
||||
gpr_.take(value.typeReg());
|
||||
if (gpr_.has(value.payloadReg()))
|
||||
gpr_.take(value.payloadReg());
|
||||
gpr_.takeUnchecked(value.typeReg());
|
||||
gpr_.takeUnchecked(value.payloadReg());
|
||||
#elif defined(JS_PUNBOX64)
|
||||
if (gpr_.has(value.valueReg()))
|
||||
gpr_.take(value.valueReg());
|
||||
gpr_.takeUnchecked(value.valueReg());
|
||||
#else
|
||||
#error "Bad architecture"
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user