mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-21 19:20:21 +02:00
Always mark return registers as live in epilog
* lib/lightning.c: Always mark JIT_RET and JIT_FRET as live in a function epilog. This is required because on some ports a complex sequence, allocating one or more registers, may be required to jump from a ret* to the epilog, and the lightning api does not have annotations to know if a function returns a value, or the type of the return value.
This commit is contained in:
parent
f79f9777b1
commit
53dd28d682
2 changed files with 29 additions and 1 deletions
|
@ -2029,9 +2029,27 @@ _jit_update(jit_state_t *_jit, jit_node_t *node,
|
|||
jit_regset_and(mask, mask, &ztmp);
|
||||
}
|
||||
break;
|
||||
case jit_code_prolog: case jit_code_epilog:
|
||||
case jit_code_prolog:
|
||||
jit_regset_set_ui(mask, 0);
|
||||
return;
|
||||
case jit_code_epilog:
|
||||
jit_regset_set_ui(mask, 0);
|
||||
#if defined(JIT_RET)
|
||||
/* On some backends it may be required to allocate one
|
||||
* or more registers to jump from a jit_ret* to the
|
||||
* epilog label.
|
||||
* Because currently there is no type information,
|
||||
* assume JIT_RET and JIT_FRET are live in the epilog.
|
||||
* Only JIT_RET really should be marked as live, to
|
||||
* prevent it being allocated, usually in the jump to
|
||||
* the epilog, but also mark JIT_FRET as live for the
|
||||
* sake of correctness. */
|
||||
jit_regset_setbit(live, JIT_RET);
|
||||
#endif
|
||||
#if defined(JIT_FRET)
|
||||
jit_regset_setbit(live, JIT_FRET);
|
||||
#endif
|
||||
return;
|
||||
case jit_code_callr:
|
||||
value = jit_regno(node->u.w);
|
||||
if (!(node->u.w & jit_regno_patch)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue