Merge pull request #9008 from Sintendo/dspjitlea
DSPJit: Various minor improvements
This commit is contained in:
commit
340c08a88d
|
@ -38,7 +38,7 @@ void DSPEmitter::ReJitConditional(const UDSPInstruction opc,
|
|||
case 0x3: // LE - Less Equal
|
||||
LEA(16, EDX, MScaled(EAX, SCALE_4, 0));
|
||||
XOR(16, R(EAX), R(EDX));
|
||||
LEA(16, EAX, MScaled(EAX, SCALE_2, 0));
|
||||
ADD(16, R(EAX), R(EAX));
|
||||
OR(16, R(EAX), R(EDX));
|
||||
TEST(16, R(EAX), Imm16(0x10));
|
||||
break;
|
||||
|
@ -56,9 +56,9 @@ void DSPEmitter::ReJitConditional(const UDSPInstruction opc,
|
|||
break;
|
||||
case 0xa: // ?
|
||||
case 0xb: // ?
|
||||
LEA(16, EDX, MScaled(EAX, SCALE_2, 0));
|
||||
LEA(16, EDX, MRegSum(EAX, EAX));
|
||||
OR(16, R(EAX), R(EDX));
|
||||
LEA(16, EDX, MScaled(EDX, SCALE_8, 0));
|
||||
SHL(16, R(EDX), Imm8(3));
|
||||
NOT(16, R(EAX));
|
||||
OR(16, R(EAX), R(EDX));
|
||||
TEST(16, R(EAX), Imm16(0x20));
|
||||
|
|
|
@ -30,7 +30,7 @@ void DSPEmitter::multiply()
|
|||
TEST(16, sr_reg, Imm16(SR_MUL_MODIFY));
|
||||
FixupBranch noMult2 = J_CC(CC_NZ);
|
||||
// prod <<= 1;
|
||||
LEA(64, RAX, MRegSum(RAX, RAX));
|
||||
ADD(64, R(RAX), R(RAX));
|
||||
SetJumpTarget(noMult2);
|
||||
m_gpr.PutReg(DSP_REG_SR, false);
|
||||
// return prod;
|
||||
|
@ -130,7 +130,7 @@ void DSPEmitter::multiply_mulx(u8 axh0, u8 axh1)
|
|||
TEST(16, sr_reg, Imm16(SR_MUL_MODIFY));
|
||||
FixupBranch noMult2 = J_CC(CC_NZ);
|
||||
// prod <<= 1;
|
||||
LEA(64, RAX, MRegSum(RAX, RAX));
|
||||
ADD(64, R(RAX), R(RAX));
|
||||
SetJumpTarget(noMult2);
|
||||
m_gpr.PutReg(DSP_REG_SR, false);
|
||||
// return prod;
|
||||
|
@ -252,8 +252,7 @@ void DSPEmitter::addpaxz(const UDSPInstruction opc)
|
|||
get_long_acx(sreg, tmp1);
|
||||
MOV(64, R(RDX), R(tmp1));
|
||||
// s64 res = prod + (ax & ~0xffff);
|
||||
MOV(64, R(RAX), Imm64(~0xffff));
|
||||
AND(64, R(RDX), R(RAX));
|
||||
AND(64, R(RDX), Imm32(~0xffff));
|
||||
// s64 prod = dsp_get_long_prod_round_prodl();
|
||||
get_long_prod_round_prodl();
|
||||
ADD(64, R(RAX), R(RDX));
|
||||
|
|
|
@ -835,14 +835,7 @@ void DSPJitRegCache::WriteReg(int dreg, OpArg arg)
|
|||
m_emitter.MOV(32, reg, Imm32(arg.Imm32()));
|
||||
break;
|
||||
case 8:
|
||||
if ((u32)arg.Imm64() == arg.Imm64())
|
||||
{
|
||||
m_emitter.MOV(64, reg, Imm32((u32)arg.Imm64()));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_emitter.MOV(64, reg, Imm64(arg.Imm64()));
|
||||
}
|
||||
m_emitter.MOV(64, reg, Imm64(arg.Imm64()));
|
||||
break;
|
||||
default:
|
||||
ASSERT_MSG(DSPLLE, 0, "unsupported memory size");
|
||||
|
|
Loading…
Reference in New Issue