Disabling tail calls.
This commit is contained in:
parent
2242778fff
commit
bf8f068fa5
|
@ -135,6 +135,7 @@ int XeEmitBranchTo(
|
||||||
printf("INDIRECT JUMP VIA LR: %.8X\n", cia);
|
printf("INDIRECT JUMP VIA LR: %.8X\n", cia);
|
||||||
XEASSERTALWAYS();
|
XEASSERTALWAYS();
|
||||||
//result = XeEmitIndirectBranchTo(e, c, src, cia, lk, kXEPPCRegLR);
|
//result = XeEmitIndirectBranchTo(e, c, src, cia, lk, kXEPPCRegLR);
|
||||||
|
c.ret();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case FunctionBlock::kTargetCTR:
|
case FunctionBlock::kTargetCTR:
|
||||||
|
@ -143,6 +144,7 @@ int XeEmitBranchTo(
|
||||||
printf("INDIRECT JUMP VIA CTR: %.8X\n", cia);
|
printf("INDIRECT JUMP VIA CTR: %.8X\n", cia);
|
||||||
XEASSERTALWAYS();
|
XEASSERTALWAYS();
|
||||||
//result = XeEmitIndirectBranchTo(e, c, src, cia, lk, kXEPPCRegCTR);
|
//result = XeEmitIndirectBranchTo(e, c, src, cia, lk, kXEPPCRegCTR);
|
||||||
|
c.ret();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -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.
|
// If the target function was small we could try to make the whole thing now.
|
||||||
PrepareFunction(target_symbol);
|
PrepareFunction(target_symbol);
|
||||||
|
|
||||||
void* target_ptr = target_symbol->impl_value;
|
uint64_t target_ptr = (uint64_t)target_symbol->impl_value;
|
||||||
XEASSERTNOTNULL(target_ptr);
|
XEASSERTNOTNULL(target_ptr);
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (tail) {
|
if (tail) {
|
||||||
// Tail calls are just jumps.
|
// Tail calls are just jumps.
|
||||||
#if defined(ASMJIT_WINDOWS)
|
#if defined(ASMJIT_WINDOWS)
|
||||||
|
@ -643,7 +644,7 @@ int X64Emitter::CallFunction(FunctionSymbol* target_symbol,
|
||||||
c.alloc(lr, rdx);
|
c.alloc(lr, rdx);
|
||||||
// TODO(benvanik): just use jmp when fixed: https://code.google.com/p/asmjit/issues/detail?id=67
|
// TODO(benvanik): just use jmp when fixed: https://code.google.com/p/asmjit/issues/detail?id=67
|
||||||
// c.jmp(target_ptr);
|
// c.jmp(target_ptr);
|
||||||
c.push(imm((uint64_t)target_ptr));
|
c.push(imm(target_ptr));
|
||||||
c.ret();
|
c.ret();
|
||||||
#else
|
#else
|
||||||
// Calling convetion: kX86FuncConvX64U
|
// Calling convetion: kX86FuncConvX64U
|
||||||
|
@ -655,6 +656,8 @@ int X64Emitter::CallFunction(FunctionSymbol* target_symbol,
|
||||||
c.ret();
|
c.ret();
|
||||||
#endif // ASMJIT_WINDOWS
|
#endif // ASMJIT_WINDOWS
|
||||||
} else {
|
} else {
|
||||||
|
#endif
|
||||||
|
{
|
||||||
// void fn(ppc_state*, uint64_t)
|
// void fn(ppc_state*, uint64_t)
|
||||||
X86CompilerFuncCall* call = c.call(target_ptr);
|
X86CompilerFuncCall* call = c.call(target_ptr);
|
||||||
call->setComment(target_symbol->name());
|
call->setComment(target_symbol->name());
|
||||||
|
|
Loading…
Reference in New Issue