diff options
Diffstat (limited to 'games/mupen64plus-rsp-parallel/9586367.patch')
-rw-r--r-- | games/mupen64plus-rsp-parallel/9586367.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/games/mupen64plus-rsp-parallel/9586367.patch b/games/mupen64plus-rsp-parallel/9586367.patch new file mode 100644 index 0000000000..511ca5ac7d --- /dev/null +++ b/games/mupen64plus-rsp-parallel/9586367.patch @@ -0,0 +1,22 @@ +From 95863671a332886c01e60a148821c7b9bf94dea7 Mon Sep 17 00:00:00 2001 +From: Logan McNaughton <848146+loganmc10@users.noreply.github.com> +Date: Sun, 24 Jul 2022 09:00:25 -0600 +Subject: [PATCH] Fix undefined behavior in LUI + +--- + rsp_jit.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rsp_jit.cpp b/rsp_jit.cpp +index 372319c..a0e1c36 100644 +--- a/rsp_jit.cpp ++++ b/rsp_jit.cpp +@@ -1422,7 +1422,7 @@ void CPU::jit_instruction(jit_state_t *_jit, uint32_t pc, uint32_t instr, + unsigned rt = (instr >> 16) & 31; + NOP_IF_RT_ZERO(); + int16_t imm = int16_t(instr); +- regs.immediate_mips_register(_jit, rt, imm << 16); ++ regs.immediate_mips_register(_jit, rt, uint16_t(imm) << 16); + regs.unlock_mips_register(rt); + break; + } |