mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-25 01:00:01 +00:00
When ins is used with a zero argument, don't OR.
Seems it's used effectively to mask out bits with rs=zero. Makes sense...
This commit is contained in:
parent
7dedf54bc3
commit
dffa35ef2f
@ -261,7 +261,12 @@ void ARMXEmitter::TSTI2R(ARMReg rs, u32 val, ARMReg scratch)
|
||||
void ARMXEmitter::ORI2R(ARMReg rd, ARMReg rs, u32 val, ARMReg scratch)
|
||||
{
|
||||
Operand2 op2;
|
||||
if (TryMakeOperand2(val, op2)) {
|
||||
if (val == 0) {
|
||||
// Avoid the ALU, may improve pipeline.
|
||||
if (rd != rs) {
|
||||
MOV(rd, rs);
|
||||
}
|
||||
} else if (TryMakeOperand2(val, op2)) {
|
||||
ORR(rd, rs, op2);
|
||||
} else {
|
||||
int ops = 0;
|
||||
|
@ -564,7 +564,9 @@ namespace MIPSComp
|
||||
|
||||
gpr.MapReg(rt, MAP_DIRTY);
|
||||
ANDI2R(gpr.R(rt), gpr.R(rt), destmask, R0);
|
||||
ORI2R(gpr.R(rt), gpr.R(rt), inserted, R0);
|
||||
if (inserted != 0) {
|
||||
ORI2R(gpr.R(rt), gpr.R(rt), inserted, R0);
|
||||
}
|
||||
} else {
|
||||
gpr.MapDirtyIn(rt, rs, false);
|
||||
#ifdef HAVE_ARMV7
|
||||
|
@ -643,7 +643,8 @@ namespace MIPSComp
|
||||
gpr.Lock(rs, rt);
|
||||
gpr.MapReg(rt, true, true);
|
||||
AND(32, gpr.R(rt), Imm32(destmask));
|
||||
OR(32, gpr.R(rt), Imm32(inserted));
|
||||
if (inserted != 0)
|
||||
OR(32, gpr.R(rt), Imm32(inserted));
|
||||
gpr.UnlockAll();
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user