1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

Fix JIT bugs

* libguile/jit.c (compile): Fix reloc fixup.
(compute_mcode): Correctly compute entry mcode.
This commit is contained in:
Andy Wingo 2019-04-04 11:33:16 +02:00
parent c63764f439
commit c0369df5e7

View file

@ -4722,7 +4722,7 @@ compile (scm_jit_state *j)
compile1 (j);
}
for (size_t i = 0; i < j->reloc_count; i++)
for (size_t i = 0; i < j->reloc_idx; i++)
{
void *target = j->labels[j->relocs[i].target_vcode_offset];
ASSERT(target);
@ -4830,7 +4830,7 @@ compute_mcode (scm_thread *thread, uint32_t *entry_ip,
data->mcode = emit_code (j, compile);
if (data->mcode)
entry_mcode = jit_address (j->jit);
entry_mcode = j->labels[j->entry - j->start];
else
entry_mcode = NULL;