DSPJitUtil: Micro-optimize increment_addr_reg
2 bytes shorter. Before: 0: 41 0f b7 c2 movzx eax,r10w 4: 41 89 c5 mov r13d,eax 7: 83 c0 01 add eax,0x1 After: 0: 45 0f b7 ea movzx r13d,r10w 4: 41 8d 45 01 lea eax,[r13+0x1]
This commit is contained in:
parent
78e566aaa5
commit
9b6f2859a4
|
@ -317,12 +317,11 @@ void DSPEmitter::increment_addr_reg(int reg)
|
|||
m_gpr.PutReg(DSP_REG_WR0 + reg, false);
|
||||
|
||||
const OpArg ar_reg = m_gpr.GetReg(DSP_REG_AR0 + reg);
|
||||
MOVZX(32, 16, EAX, ar_reg);
|
||||
|
||||
X64Reg tmp1 = m_gpr.GetFreeXReg();
|
||||
MOVZX(32, 16, tmp1, ar_reg);
|
||||
|
||||
// u32 nar = ar + 1;
|
||||
MOV(32, R(tmp1), R(EAX));
|
||||
ADD(32, R(EAX), Imm8(1));
|
||||
LEA(32, EAX, MDisp(tmp1, 1));
|
||||
|
||||
// if ((nar ^ ar) > ((wr | 1) << 1))
|
||||
// nar -= wr + 1;
|
||||
|
|
Loading…
Reference in New Issue