diff --git a/src/xenia/cpu/x64/x64_emit_control.cc b/src/xenia/cpu/x64/x64_emit_control.cc index a4c4cb063..d3e5b90d5 100644 --- a/src/xenia/cpu/x64/x64_emit_control.cc +++ b/src/xenia/cpu/x64/x64_emit_control.cc @@ -135,6 +135,7 @@ int XeEmitBranchTo( printf("INDIRECT JUMP VIA LR: %.8X\n", cia); XEASSERTALWAYS(); //result = XeEmitIndirectBranchTo(e, c, src, cia, lk, kXEPPCRegLR); + c.ret(); break; } case FunctionBlock::kTargetCTR: @@ -143,6 +144,7 @@ int XeEmitBranchTo( printf("INDIRECT JUMP VIA CTR: %.8X\n", cia); XEASSERTALWAYS(); //result = XeEmitIndirectBranchTo(e, c, src, cia, lk, kXEPPCRegCTR); + c.ret(); break; } default: diff --git a/src/xenia/cpu/x64/x64_emitter.cc b/src/xenia/cpu/x64/x64_emitter.cc index 2b3bcb046..01ce33836 100644 --- a/src/xenia/cpu/x64/x64_emitter.cc +++ b/src/xenia/cpu/x64/x64_emitter.cc @@ -631,9 +631,10 @@ int X64Emitter::CallFunction(FunctionSymbol* target_symbol, // If the target function was small we could try to make the whole thing now. PrepareFunction(target_symbol); - void* target_ptr = target_symbol->impl_value; + uint64_t target_ptr = (uint64_t)target_symbol->impl_value; XEASSERTNOTNULL(target_ptr); +#if 0 if (tail) { // Tail calls are just jumps. #if defined(ASMJIT_WINDOWS) @@ -643,7 +644,7 @@ int X64Emitter::CallFunction(FunctionSymbol* target_symbol, c.alloc(lr, rdx); // TODO(benvanik): just use jmp when fixed: https://code.google.com/p/asmjit/issues/detail?id=67 // c.jmp(target_ptr); - c.push(imm((uint64_t)target_ptr)); + c.push(imm(target_ptr)); c.ret(); #else // Calling convetion: kX86FuncConvX64U @@ -655,6 +656,8 @@ int X64Emitter::CallFunction(FunctionSymbol* target_symbol, c.ret(); #endif // ASMJIT_WINDOWS } else { +#endif + { // void fn(ppc_state*, uint64_t) X86CompilerFuncCall* call = c.call(target_ptr); call->setComment(target_symbol->name());