mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-04-19 10:51:18 +00:00
Load function pointers from the base pointer.
This commit is contained in:
parent
4650dc69fb
commit
de2840970f
@ -105,8 +105,12 @@
|
||||
#define PPC_CALL_FUNC(x) x(ctx, base)
|
||||
#endif
|
||||
|
||||
#define PPC_MEMORY_SIZE 0x100000000ull
|
||||
#define PPC_FUNC_TABLE_OFFSET PPC_MEMORY_SIZE
|
||||
#define PPC_FUNC_TABLE_SIZE 0x200000000ull
|
||||
|
||||
#ifndef PPC_CALL_INDIRECT_FUNC
|
||||
#define PPC_CALL_INDIRECT_FUNC(x) (*(PPCFunc**)(ctx.fn + uint64_t(x) * 2))(ctx, base)
|
||||
#define PPC_CALL_INDIRECT_FUNC(x) (*(PPCFunc**)(base + PPC_FUNC_TABLE_OFFSET + (uint64_t(x) * 2)))(ctx, base)
|
||||
#endif
|
||||
|
||||
typedef void PPCFunc(struct PPCContext& __restrict__ ctx, uint8_t* base);
|
||||
@ -309,7 +313,6 @@ struct PPCContext
|
||||
PPCRegister r31;
|
||||
#endif
|
||||
|
||||
uint8_t* fn;
|
||||
#ifndef PPC_CONFIG_SKIP_LR
|
||||
uint64_t lr;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user