1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00
guile/tests
Helmut Eller f31fb0044d Fix some problems with callr and calli.
The problem with callr is that the register that contains the
function to be called, can be overwritten by the logic that moves
the values into argument registers.  To fix this, I added a
get_callr_temp function that should return a platform specific
register that is not used to pass arguments.  For Aarch64/Arm the
link registers seems to work; for Amd64/i686 the RAX register.
The function/tmp pair becomes an additional argument to the
parallel assigment; this way the original function register is not
accidentally overwritten.

The problem with calli is that it may not have enough temp
registers to move arguments.  The windmill paper says that at most
one temporary register is needed for the parallel assignment.
However, we also need a temp register for mem-to-mem moves.  So it
seems that we need a second temporary.  For Amd64/i686 we have
only one temporary GPR and one temporary FPR.  To fix this, I
modified the algorithm from the paper a bit: we perform the
mem-to-mem moves before the other moves.  Later when we need the
temp to break cycles, there shouldn't be any mem-to-mem moves
left.  So we should never need two temps at the same time.

* lightening/lightening.c: (get_callr_temp): New function; need
for each platform.
(prepare_call_args): Include the function/callr_temp pair in the
arguments for the parallel assignment.

* lightening/x86.c, lightening/arm.c, lightening/aarch64.c
(get_callr_temp): Implementation for each platform.

* lightening/arm.c (next_abi_arg): Fix the stack size for doubles.

* tests/call_10_2.c, tests/callr_10.c: New tests.
* tests/regarrays.inc: New file. Common code between the above two
tests that would be tedious to duplicate.
2022-06-08 16:20:42 +02:00
..
absr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
absr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
addi.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
addr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
addr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
addr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
addx.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
andi.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
andr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
beqi.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
beqr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
beqr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
beqr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bgei.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bgei_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bger.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bger_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bger_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bger_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bgti.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bgti_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bgtr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bgtr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bgtr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bgtr_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
blei.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
blei_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bler.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bler_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bler_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bler_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bltgtr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bltgtr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
blti.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
blti_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bltr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bltr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bltr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bltr_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bmci.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bmcr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bmsi.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bmsr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bnei.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bner.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bner_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bner_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
boaddi.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
boaddi_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
boaddr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
boaddr_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bordr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bordr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bosubi.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bosubi_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bosubr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bosubr_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bswapr_ui.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bswapr_ul.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bswapr_us.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
buneqr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
buneqr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bunger_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bunger_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bungtr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bungtr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bunler_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bunler_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bunltr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bunltr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bunordr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bunordr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bxaddi.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bxaddi_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bxaddr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bxaddr_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bxsubi.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bxsubi_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bxsubr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
bxsubr_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
call_10.c Small bug fixes for ia32 2019-04-26 17:41:43 +02:00
call_10_2.c Fix some problems with callr and calli. 2022-06-08 16:20:42 +02:00
callee_9.c Add test for JIT callee with many args 2019-04-27 23:11:13 +02:00
callr_10.c Fix some problems with callr and calli. 2022-06-08 16:20:42 +02:00
comr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
divr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
divr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
divr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
divr_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
extr_c.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
extr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
extr_d_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
extr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
extr_f_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
extr_i.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
extr_s.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
extr_uc.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
extr_ui.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
extr_us.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
jmp0.c Fix jmp-shortening on x64 when target within instruction. 2021-01-07 11:04:17 +01:00
jmp_table.c Allow jit_begin_data to declare max data size 2020-07-30 13:41:02 +02:00
jmpi.c Ensure tail caller and callee in jmpi test have compatible ABI 2020-07-30 11:52:57 +02:00
jmpi_local.c Add a test for local forward and backward jumps 2020-04-09 17:31:25 +12:00
jmpr.c Stack alignment takes saved return address into account 2019-04-28 12:37:19 +02:00
ldi_c.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldi_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldi_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldi_i.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldi_l.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldi_s.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldi_uc.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldi_ui.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldi_us.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldr_c.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldr_i.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldr_l.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldr_s.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldr_uc.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldr_ui.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldr_us.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxi_c.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxi_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxi_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxi_i.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxi_l.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxi_s.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxi_uc.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxi_ui.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxi_us.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxr_c.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxr_i.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxr_l.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxr_s.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxr_uc.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxr_ui.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ldxr_us.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
link-register.c Add jmpi_with_link instruction 2019-06-20 10:13:37 +02:00
lshi.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
lshr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
Makefile tests: Remove 'glibc' from the 'guix environment' command line. 2020-06-20 16:14:10 +02:00
mov_addr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
movi.c Add 'movi' test. 2020-06-20 16:34:37 +02:00
movi_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
movi_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
mulr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
mulr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
mulr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
negr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
negr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
negr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
ori.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
orr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
qdivr.c Add facility to enter and leave JIT ABI 2019-04-26 17:28:29 +02:00
qdivr_u.c Add facility to enter and leave JIT ABI 2019-04-26 17:28:29 +02:00
qmulr.c Add facility to enter and leave JIT ABI 2019-04-26 17:28:29 +02:00
qmulr_u.c Add facility to enter and leave JIT ABI 2019-04-26 17:28:29 +02:00
regarrays.inc Fix some problems with callr and calli. 2022-06-08 16:20:42 +02:00
remr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
remr_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
rshi.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
rshi_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
rshr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
rshr_u.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
sqrtr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
sqrtr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
sti_c.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
sti_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
sti_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
sti_i.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
sti_l.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
sti_s.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
str_c.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
str_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
str_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
str_i.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
str_l.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
str_s.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
stxi_c.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
stxi_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
stxi_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
stxi_i.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
stxi_l.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
stxi_s.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
stxr_c.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
stxr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
stxr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
stxr_i.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
stxr_l.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
stxr_s.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
subr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
subr_d.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
subr_f.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
subx.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
test.h Allow users to pass custom allocators 2019-04-03 15:25:21 +02:00
truncr_d_i.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
truncr_d_l.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
truncr_f_i.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
truncr_f_l.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
xori.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00
xorr.c Add {enter,leave}_jit_abi calls in tests 2019-04-27 22:54:38 +02:00