From 7b8e37aa3758c3ce2361433965cb94f2a0505eb2 Mon Sep 17 00:00:00 2001 From: "Skyth (Asilkan)" <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Thu, 6 Mar 2025 17:56:18 +0300 Subject: [PATCH] Fix the unsafe base address assumption. (#69) --- XenonUtils/ppc_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XenonUtils/ppc_context.h b/XenonUtils/ppc_context.h index bc427c9..0ed3fcf 100644 --- a/XenonUtils/ppc_context.h +++ b/XenonUtils/ppc_context.h @@ -29,7 +29,7 @@ #define PPC_EXTERN_FUNC(x) extern PPC_FUNC(x) #define PPC_WEAK_FUNC(x) __attribute__((weak,noinline)) PPC_FUNC(x) -#define PPC_FUNC_PROLOGUE() __builtin_assume(((size_t)base & 0xFFFFFFFF) == 0) +#define PPC_FUNC_PROLOGUE() __builtin_assume(((size_t)base & 0x1F) == 0) #ifndef PPC_LOAD_U8 #define PPC_LOAD_U8(x) *(volatile uint8_t*)(base + (x))