1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 13:00:26 +02:00

Fix load width of get-ip-relative-addr

* libguile/jit.c (emit_get_ip_relative_addr): Fix load width.
This commit is contained in:
Andy Wingo 2018-08-23 17:19:15 +02:00
parent 065efdd101
commit bf035d9385

View file

@ -441,7 +441,7 @@ emit_get_ip_relative_addr (scm_jit_state *j, jit_gpr_t dst, jit_gpr_t ip,
uint32_t offset)
{
uint32_t byte_offset = offset * sizeof (uint32_t);
jit_ldxi (dst, ip, byte_offset);
jit_ldxi_i (dst, ip, byte_offset);
jit_lshi (dst, dst, 2); /* Multiply by sizeof (uint32_t) */
jit_addr (dst, dst, ip);
}
@ -477,8 +477,11 @@ emit_indirect_tail_call (scm_jit_state *j)
emit_get_callee_vcode (j, T0);
/* FIXME: If all functions start with instrument-entry, no need for
this check. */
emit_get_vcode_low_byte (j, T1, T0);
not_instrumented = jit_bnei (T1, scm_op_instrument_entry);
emit_get_ip_relative_addr (j, T1, T0, 1);
jit_ldr (T1, T1);
no_mcode = jit_beqi (T1, 0);