DSPJitArithmetic: Precompute addis immediate
Compute immediate value at compile time.
This commit is contained in:
parent
3951d238d9
commit
5b5886160e
|
@ -735,9 +735,8 @@ void DSPEmitter::addis(const UDSPInstruction opc)
|
||||||
MOV(64, R(RAX), R(tmp1));
|
MOV(64, R(RAX), R(tmp1));
|
||||||
// s64 imm = (s8)(u8)opc;
|
// s64 imm = (s8)(u8)opc;
|
||||||
// imm <<= 16;
|
// imm <<= 16;
|
||||||
MOV(8, R(RDX), Imm8((u8)opc));
|
s32 imm = static_cast<u8>(opc) << 24 >> 8;
|
||||||
MOVSX(64, 8, RDX, R(RDX));
|
MOV(64, R(RDX), Imm32(imm));
|
||||||
SHL(64, R(RDX), Imm8(16));
|
|
||||||
// s64 res = acc + imm;
|
// s64 res = acc + imm;
|
||||||
ADD(64, R(RAX), R(RDX));
|
ADD(64, R(RAX), R(RDX));
|
||||||
// dsp_set_long_acc(dreg, res);
|
// dsp_set_long_acc(dreg, res);
|
||||||
|
|
Loading…
Reference in New Issue