mirror of
				https://github.com/hedge-dev/XenonRecomp.git
				synced 2025-11-04 06:47:09 +00:00 
			
		
		
		
	Load function pointers from the base pointer.
This commit is contained in:
		@@ -105,8 +105,12 @@
 | 
				
			|||||||
#define PPC_CALL_FUNC(x) x(ctx, base)
 | 
					#define PPC_CALL_FUNC(x) x(ctx, base)
 | 
				
			||||||
#endif
 | 
					#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
 | 
					#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
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef void PPCFunc(struct PPCContext& __restrict__ ctx, uint8_t* base);
 | 
					typedef void PPCFunc(struct PPCContext& __restrict__ ctx, uint8_t* base);
 | 
				
			||||||
@@ -309,7 +313,6 @@ struct PPCContext
 | 
				
			|||||||
    PPCRegister r31;
 | 
					    PPCRegister r31;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    uint8_t* fn;
 | 
					 | 
				
			||||||
#ifndef PPC_CONFIG_SKIP_LR
 | 
					#ifndef PPC_CONFIG_SKIP_LR
 | 
				
			||||||
    uint64_t lr;
 | 
					    uint64_t lr;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user