diff options
author | Andy Wingo <wingo@igalia.com> | 2019-06-20 10:08:28 +0200 |
---|---|---|
committer | Andy Wingo <wingo@igalia.com> | 2019-06-20 10:13:37 +0200 |
commit | 62183fb098e14ad45fc0eae727f98558812b67db (patch) | |
tree | 6df7076f5ac3745a23900d022daded2fe347b8df /libguile/lightening/lightening.h | |
parent | 84b9ef087b49e0685848826156baaed02655efb4 (diff) | |
download | guile-62183fb098e14ad45fc0eae727f98558812b67db.tar.gz |
Add jmpi_with_link instruction
The existing calli / callr interface is for ABI calls. Sometimes though
you want to call some of your own code, just to get the current return
address. ARM's branch-and-link instructions are ideal for this but they
don't exist on x86; there we emulate them by adding corresponding
pop_link_register / push_link_register instructions that are no-ops on
ARM.
* lightening.h (FOR_EACH_INSTRUCTION): Add jit_jmpi_with_link,
pop_link_register, push_link_register.
* lightening/arm-cpu.c:
* lightening/x86-cpu.c:
* lightening/aarch64-cpu.c (jmpi_with_link, push_link_register)
(pop_link_register): Add implementations.
* lightening/arm.h:
* lightening/aarch64.h:
* lightening/x86.h (JIT_LR): New definition.
* tests/link-register.c: New test.
Diffstat (limited to 'libguile/lightening/lightening.h')
0 files changed, 0 insertions, 0 deletions