From 7e6b92ac6ee5b648b58bedb9c885a17a13838eac Mon Sep 17 00:00:00 2001 From: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Sun, 15 Sep 2024 20:30:56 +0300 Subject: [PATCH] Fix memset/bdnzf compilation error. --- PowerRecomp/main.cpp | 2 +- PowerUtils/ppc_context.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/PowerRecomp/main.cpp b/PowerRecomp/main.cpp index 390facd..13fe5ba 100644 --- a/PowerRecomp/main.cpp +++ b/PowerRecomp/main.cpp @@ -270,7 +270,7 @@ int main() case PPC_INST_BDNZF: // NOTE: assuming eq here as a shortcut because all the instructions in the game do that - println("\tif (--ctx.ctr != 0 && !ctx.cr{}.eq) goto loc_{:X};", insn.operands[0], insn.operands[2]); + println("\tif (--ctx.ctr != 0 && !ctx.cr{}.eq) goto loc_{:X};", insn.operands[0] / 4, insn.operands[1]); break; case PPC_INST_BEQ: diff --git a/PowerUtils/ppc_context.h b/PowerUtils/ppc_context.h index 0fc971c..2cb4e77 100644 --- a/PowerUtils/ppc_context.h +++ b/PowerUtils/ppc_context.h @@ -1,6 +1,7 @@ #pragma once #include #include +#include #include #ifdef __clang__