From de4becc26e0c22a71b6615b3a2f35050e82fded0 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 24 Jun 2025 16:14:07 -0400 Subject: [PATCH] OpcodeDispatcher: mask certain divisors needed for fusing. Signed-off-by: Alyssa Rosenzweig --- FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp b/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp index 8aa80976b..ce60f1113 100644 --- a/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp +++ b/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp @@ -3582,12 +3582,12 @@ void OpDispatchBuilder::NEGOp(OpcodeArgs) { } void OpDispatchBuilder::DIVOp(OpcodeArgs) { - // This loads the divisor - Ref Divisor = LoadSource(GPRClass, Op, Op->Dest, Op->Flags); - const auto GPRSize = CTX->GetGPROpSize(); auto Size = OpSizeFromSrc(Op); + // This loads the divisor. 32-bit/64-bit paths mask inside the JIT, 8/16 do not. + Ref Divisor = LoadSource(GPRClass, Op, Op->Dest, Op->Flags, {.AllowUpperGarbage = Size >= OpSize::i32Bit}); + if (Size == OpSize::i64Bit && !CTX->Config.Is64BitMode) { LogMan::Msg::EFmt("Doesn't exist in 32bit mode"); DecodeFailure = true;