From 07c734381b5d73cce94232e7a230bda72597166d Mon Sep 17 00:00:00 2001 From: Rairii <2650838+Wack0@users.noreply.github.com> Date: Tue, 16 Jul 2024 21:24:12 +0100 Subject: [PATCH] arcfw: fix mfpvr instruction patching this isn't my cursed big endian hackfest, the correct endianness is little --- arcgrackle/source/arcload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arcgrackle/source/arcload.c b/arcgrackle/source/arcload.c index cbaad21..17a4c6d 100644 --- a/arcgrackle/source/arcload.c +++ b/arcgrackle/source/arcload.c @@ -91,12 +91,12 @@ static void InstructionPerformPatch( // NT 4 osloader checks pvr, if it's not in hardcoded list then panic // so patch this check :) if (PvrVersion > 9 && PvrVersion != 20) { - PPC_INSTRUCTION_BIG Insn; + PPC_INSTRUCTION Insn; Insn.Long = instruction; if (Insn.Primary_Op == X31_OP && Insn.XFXform_XO == MFSPR_OP && Insn.XFXform_spr == 1000) { // Make NT believe this is an Arthur derivative // addis rx, 0, 8 - PPC_INSTRUCTION_BIG Patch; + PPC_INSTRUCTION Patch; Patch.Long = 0; Patch.Primary_Op = ADDIS_OP; Patch.Dform_RT = Insn.XFXform_RT;