mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
[ARM32] Minor optimization in paired loadstores.
When the offset can fit in the instruction encoding make sure to do so.
This commit is contained in:
parent
52c6fb180b
commit
b848365f78
@ -35,9 +35,21 @@ void JitArm::psq_l(UGeckoInstruction inst)
|
||||
UBFX(R11, R11, 24, 6); // Scale
|
||||
LSL(R11, R11, 2);
|
||||
|
||||
MOVI2R(R10, (u32)offset);
|
||||
if (inst.RA || update) // Always uses the register on update
|
||||
ADD(R10, R10, gpr.R(inst.RA));
|
||||
Operand2 off;
|
||||
if (TryMakeOperand2(offset, off))
|
||||
{
|
||||
if (inst.RA || update)
|
||||
ADD(R10, gpr.R(inst.RA), off);
|
||||
else
|
||||
MOV(R10, off);
|
||||
}
|
||||
else
|
||||
{
|
||||
MOVI2R(R10, (u32)offset);
|
||||
if (inst.RA || update) // Always uses the register on update
|
||||
ADD(R10, R10, gpr.R(inst.RA));
|
||||
}
|
||||
|
||||
if (update)
|
||||
MOV(gpr.R(inst.RA), R10);
|
||||
MOVI2R(R14, (u32)asm_routines.pairedLoadQuantized);
|
||||
@ -126,14 +138,19 @@ void JitArm::psq_st(UGeckoInstruction inst)
|
||||
UBFX(R11, R11, 8, 6); // Scale
|
||||
LSL(R11, R11, 2);
|
||||
|
||||
if (inst.RA || update) // Always uses the register on update
|
||||
Operand2 off;
|
||||
if (TryMakeOperand2(offset, off))
|
||||
{
|
||||
MOVI2R(R14, offset);
|
||||
ADD(R10, gpr.R(inst.RA), R14);
|
||||
if (inst.RA || update)
|
||||
ADD(R10, gpr.R(inst.RA), off);
|
||||
else
|
||||
MOV(R10, off);
|
||||
}
|
||||
else
|
||||
{
|
||||
MOVI2R(R10, (u32)offset);
|
||||
if (inst.RA || update) // Always uses the register on update
|
||||
ADD(R10, R10, gpr.R(inst.RA));
|
||||
}
|
||||
|
||||
if (update)
|
||||
|
Loading…
Reference in New Issue
Block a user