DSPJitMultiplier: addpaxz - AND constant directly

There's no need to load the 64-bit immediate into a temporary register.
x64 will sign-extend 32-bit immediates to 64 bits, giving us the exact
value we need in this case.

48 C7 C0 00 00 FF FF    mov         rax,0FFFFFFFFFFFF0000h
48 21 C2                and         rdx,rax

48 81 E2 00 00 FF FF    and         rdx,0FFFFFFFFFFFF0000h
This commit is contained in:
Sintendo 2020-01-29 23:17:18 +01:00
parent 49a4e09719
commit 618d261b91
1 changed files with 1 additions and 2 deletions

View File

@ -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));