diff --git a/Source/Core/Core/Src/PowerPC/JitArm32/Jit.h b/Source/Core/Core/Src/PowerPC/JitArm32/Jit.h index b46c009623..d465c1a6d4 100644 --- a/Source/Core/Core/Src/PowerPC/JitArm32/Jit.h +++ b/Source/Core/Core/Src/PowerPC/JitArm32/Jit.h @@ -223,6 +223,7 @@ public: // Paired Singles void ps_add(UGeckoInstruction _inst); void ps_div(UGeckoInstruction _inst); + void ps_res(UGeckoInstruction _inst); void ps_sum0(UGeckoInstruction _inst); void ps_sum1(UGeckoInstruction _inst); void ps_madd(UGeckoInstruction _inst); diff --git a/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Paired.cpp b/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Paired.cpp index 33e3a19780..e5cda2ee2e 100644 --- a/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Paired.cpp +++ b/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Paired.cpp @@ -169,6 +169,27 @@ void JitArm::ps_div(UGeckoInstruction inst) VDIV(vD1, vA1, vB1); } +void JitArm::ps_res(UGeckoInstruction inst) +{ + INSTRUCTION_START + JITDISABLE(bJITPairedOff) + + u32 b = inst.FB, d = inst.FD; + if (inst.Rc){ + Default(inst); return; + } + ARMReg vB0 = fpr.R0(b); + ARMReg vB1 = fpr.R1(b); + ARMReg vD0 = fpr.R0(d, false); + ARMReg vD1 = fpr.R1(d, false); + ARMReg V0 = fpr.GetReg(); + MOVI2R(V0, 1.0, INVALID_REG); // temp reg not needed for 1.0 + + VDIV(vD0, V0, vB0); + VDIV(vD1, V0, vB1); + fpr.Unlock(V0); +} + void JitArm::ps_nmadd(UGeckoInstruction inst) { INSTRUCTION_START diff --git a/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Tables.cpp b/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Tables.cpp index 79e70c38c6..df913230e2 100644 --- a/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Tables.cpp +++ b/Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Tables.cpp @@ -153,7 +153,7 @@ static GekkoOPTemplate table4_2[] = {20, &JitArm::ps_sub}, //"ps_sub", OPTYPE_PS, 0}}, {21, &JitArm::ps_add}, //"ps_add", OPTYPE_PS, 0}}, {23, &JitArm::ps_sel}, //"ps_sel", OPTYPE_PS, 0}}, - {24, &JitArm::Default}, //"ps_res", OPTYPE_PS, 0}}, + {24, &JitArm::ps_res}, //"ps_res", OPTYPE_PS, 0}}, {25, &JitArm::ps_mul}, //"ps_mul", OPTYPE_PS, 0}}, {26, &JitArm::ps_rsqrte}, //"ps_rsqrte", OPTYPE_PS, 0, 1}}, {28, &JitArm::ps_msub}, //"ps_msub", OPTYPE_PS, 0}},