Merge pull request #22571 from hrydgard/vrnds-seed-from-vs

VFPU: vrnds takes its seed from the vs field
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2026-10-15 00:38:00 +02:00
commit cfbc5cdef9
3 files changed
+6 -5

No files matched your search

+3 -2
View File
@@ -1587,8 +1587,9 @@ namespace MIPSInt
}
void Int_Vrnds(MIPSState *mips, MIPSOpcode op) {
int vd = _VD;
int seed = VI(vd);
// The seed is in the vs field. The toolchain leaves vd zero, so reading vd gets S000.
int vs = _VS;
int seed = VI(vs);
// Swizzles apply a constant value, constants/abs/neg work to vary the seed.
ApplySwizzleS(mips, reinterpret_cast<float *>(&seed), V_Single);
vrnd_init(uint32_t(seed), mips->vfpuCtrl + VFPU_CTRL_RCX0);
+2 -2
View File
@@ -567,9 +567,9 @@ namespace MIPSDis
}
void Dis_Vrnds(MIPSOpcode op, uint32_t pc, char *out, size_t outSize) {
int vd = _VD;
int vs = _VS;
const char *name = MIPSGetName(op);
snprintf(out, outSize, "%s%s\t%s", name, VSuff(op), VN(vd, V_Single));
snprintf(out, outSize, "%s%s\t%s", name, VSuff(op), VN(vs, V_Single));
}
void Dis_VrndX(MIPSOpcode op, uint32_t pc, char *out, size_t outSize) {