diff --git a/src/xenia/cpu/backend/x64/x64_backend.cc b/src/xenia/cpu/backend/x64/x64_backend.cc index 0c77034ac..130d84456 100644 --- a/src/xenia/cpu/backend/x64/x64_backend.cc +++ b/src/xenia/cpu/backend/x64/x64_backend.cc @@ -519,7 +519,7 @@ GuestToHostThunk X64ThunkEmitter::EmitGuestToHostThunk() { } // X64Emitter handles actually resolving functions. -extern "C" uint64_t ResolveFunction(void* raw_context, uint32_t target_address); +uint64_t ResolveFunction(void* raw_context, uint64_t target_address); ResolveFunctionThunk X64ThunkEmitter::EmitResolveFunctionThunk() { // ebx = target PPC address @@ -548,7 +548,7 @@ ResolveFunctionThunk X64ThunkEmitter::EmitResolveFunctionThunk() { mov(rcx, rsi); // context mov(rdx, rbx); - mov(rax, uint64_t(&ResolveFunction)); + mov(rax, reinterpret_cast(&ResolveFunction)); call(rax); EmitLoadVolatileRegs(); diff --git a/src/xenia/cpu/backend/x64/x64_emitter.cc b/src/xenia/cpu/backend/x64/x64_emitter.cc index 4076c0d65..f3419bb05 100644 --- a/src/xenia/cpu/backend/x64/x64_emitter.cc +++ b/src/xenia/cpu/backend/x64/x64_emitter.cc @@ -382,15 +382,14 @@ void X64Emitter::UnimplementedInstr(const hir::Instr* i) { } // This is used by the X64ThunkEmitter's ResolveFunctionThunk. -extern "C" uint64_t ResolveFunction(void* raw_context, - uint64_t target_address) { +uint64_t ResolveFunction(void* raw_context, uint64_t target_address) { auto thread_state = *reinterpret_cast(raw_context); // TODO(benvanik): required? assert_not_zero(target_address); - auto fn = - thread_state->processor()->ResolveFunction((uint32_t)target_address); + auto fn = thread_state->processor()->ResolveFunction( + static_cast(target_address)); assert_not_null(fn); auto x64_fn = static_cast(fn); uint64_t addr = reinterpret_cast(x64_fn->machine_code());