mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-13 04:36:57 +00:00
feat(jit): added support for arm translate_and_run
This commit is contained in:
parent
33091fe066
commit
f5c383ffe6
1 changed files with 8 additions and 0 deletions
|
|
@ -48,11 +48,19 @@ void JIT::translate_and_run(CPU& cpu) {
|
|||
|
||||
JitFunc fn = reinterpret_cast<JitFunc>(code);
|
||||
u64 result;
|
||||
#if defined(__x86_64__)
|
||||
asm volatile("call *%1\n"
|
||||
"mov %%rax, %0\n"
|
||||
: "=r"(result)
|
||||
: "r"(fn)
|
||||
: "%rax");
|
||||
#elif defined(__aarch64__)
|
||||
asm volatile("blr %1\n"
|
||||
"mov %0, x0\n"
|
||||
: "=r"(result)
|
||||
: "r"(fn)
|
||||
: "x0");
|
||||
#endif
|
||||
|
||||
cpu.regs[0] = result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue