From 85ee7c85c1095d7fd0da4d41f3e7f3983bb7aff4 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 6 Aug 2023 12:05:51 -0700 Subject: [PATCH] irjit: Allow masked vneg.q. --- Core/MIPS/IR/IRCompFPU.cpp | 3 ++- Core/MIPS/IR/IRCompVFPU.cpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Core/MIPS/IR/IRCompFPU.cpp b/Core/MIPS/IR/IRCompFPU.cpp index b0edeea0cf..3c3ed87d03 100644 --- a/Core/MIPS/IR/IRCompFPU.cpp +++ b/Core/MIPS/IR/IRCompFPU.cpp @@ -226,7 +226,8 @@ void IRFrontend::Comp_mxc1(MIPSOpcode op) { UpdateRoundingMode(); ApplyRoundingMode(); } else { - Comp_Generic(op); + // Maybe not strictly invalid? But likely invalid. + INVALIDOP; } return; default: diff --git a/Core/MIPS/IR/IRCompVFPU.cpp b/Core/MIPS/IR/IRCompVFPU.cpp index c902951d96..c80fa6e1ff 100644 --- a/Core/MIPS/IR/IRCompVFPU.cpp +++ b/Core/MIPS/IR/IRCompVFPU.cpp @@ -782,6 +782,10 @@ namespace MIPSComp { if (optype == 0) { if (js.HasUnknownPrefix() || !IsPrefixWithinSize(js.prefixS, op)) DISABLE; + } else if (optype == 1 || optype == 2) { + // D prefix is fine for these, and used sometimes. + if (js.HasUnknownPrefix() || js.HasSPrefix()) + DISABLE; } else { // Many of these apply the D prefix strangely or override parts of the S prefix. if (!js.HasNoPrefix())