Calling to/from native works!
This commit is contained in:
@@ -186,6 +186,7 @@ int LibjitEmitter::MakeFunction(FunctionSymbol* symbol, jit_function_t gen_fn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!result_code) {
|
if (!result_code) {
|
||||||
|
// TODO(benvanik): flag
|
||||||
// pre
|
// pre
|
||||||
jit_dump_function(stdout, gen_fn_, symbol->name());
|
jit_dump_function(stdout, gen_fn_, symbol->name());
|
||||||
jit_function_compile(gen_fn_);
|
jit_function_compile(gen_fn_);
|
||||||
|
|||||||
@@ -100,10 +100,10 @@ int LibjitJIT::Execute(xe_ppc_state_t* ppc_state, FunctionSymbol* fn_symbol) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO(benvanik): replace generic apply with special trampoline.
|
// TODO(benvanik): replace generic apply with special trampoline.
|
||||||
void* args[] = {&ppc_state, &ppc_state->lr};
|
intptr_t args[] = {(intptr_t)ppc_state, ppc_state->lr};
|
||||||
uint64_t return_value;
|
uint64_t return_value;
|
||||||
int apply_result = jit_function_apply(jit_fn, (void**)&args, &return_value);
|
int apply_result = jit_function_apply(jit_fn, (void**)&args, &return_value);
|
||||||
if (apply_result) {
|
if (!apply_result) {
|
||||||
XELOGCPU("Execute(%.8X): apply failed with %d",
|
XELOGCPU("Execute(%.8X): apply failed with %d",
|
||||||
fn_symbol->start_address, apply_result);
|
fn_symbol->start_address, apply_result);
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
2
third_party/libjit
vendored
2
third_party/libjit
vendored
Submodule third_party/libjit updated: bd2b2e2bf0...61b04ce23f
Reference in New Issue
Block a user