From 2da1bf7ffc564c7ff62e05e98ad8b5662a18318f Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 30 Oct 2022 21:47:28 -0700 Subject: [PATCH] interp: Correct dprefix accuracy for vrot. Ignores cosine lane, not always x. --- Core/MIPS/MIPSIntVFPU.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Core/MIPS/MIPSIntVFPU.cpp b/Core/MIPS/MIPSIntVFPU.cpp index bc1120921e..1b2c8d60ec 100644 --- a/Core/MIPS/MIPSIntVFPU.cpp +++ b/Core/MIPS/MIPSIntVFPU.cpp @@ -1629,8 +1629,9 @@ namespace MIPSInt d[cosineLane] = cosine; } - // D prefix works, just not for x. - currentMIPS->vfpuCtrl[VFPU_CTRL_DPREFIX] &= 0xFFEFC; + // D prefix works, just not for the cosine lane. + uint32_t dprefixRemove = (3 << cosineLane) | (1 << (8 + cosineLane)); + currentMIPS->vfpuCtrl[VFPU_CTRL_DPREFIX] &= 0xFFFFF ^ dprefixRemove; ApplyPrefixD(d, sz); WriteVector(d, sz, vd); PC += 4;