From 3fbe687fe16a033f8820873e96fe495fd0ff7544 Mon Sep 17 00:00:00 2001 From: CRACKbomber <1568512+CRACKbomber@users.noreply.github.com> Date: Fri, 23 May 2025 14:48:12 -0400 Subject: [PATCH] Implement rlwnm --- XenonRecomp/recompiler.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/XenonRecomp/recompiler.cpp b/XenonRecomp/recompiler.cpp index aa6e428..04f0bb6 100644 --- a/XenonRecomp/recompiler.cpp +++ b/XenonRecomp/recompiler.cpp @@ -1421,6 +1421,14 @@ bool Recompiler::Recompile( println("\t{}.compare({}.s32, 0, {});", cr(0), r(insn.operands[0]), xer()); break; + case PPC_INST_RLWNM: + println("\t{}.u64 = __builtin_rotateleft64({}.u32 | ({}.u64 << 32), {}.u8 & 0x1F) & 0x{:X};", + r(insn.operands[0]), r(insn.operands[1]), r(insn.operands[1]), + r(insn.operands[2]), ComputeMask(insn.operands[3] + 32, insn.operands[4] + 32)); + if (strchr(insn.opcode->name, '.')) + println("\t{}.compare({}.s32, 0, {});", cr(0), r(insn.operands[0]), xer()); + break; + case PPC_INST_ROTLDI: println("\t{}.u64 = __builtin_rotateleft64({}.u64, {});", r(insn.operands[0]), r(insn.operands[1]), insn.operands[2]); break;