diff --git a/src/runtime/c/pgf/jit.c b/src/runtime/c/pgf/jit.c index 64f705bc9..715fb26a9 100644 --- a/src/runtime/c/pgf/jit.c +++ b/src/runtime/c/pgf/jit.c @@ -423,7 +423,7 @@ pgf_jit_gates(PgfReader* rdr) jit_stxi_p(offsetof(PgfValuePAP,fun), JIT_RET, JIT_VCLOS); jit_stxi_p(offsetof(PgfValuePAP,n_args), JIT_RET, JIT_R1); jit_ldr_p(JIT_R2, JIT_SP); - ref2 = jit_bnei_i(jit_forward(), JIT_R2, (int)gates->update_closure); + ref2 = jit_bnei_p(jit_forward(), JIT_R2, gates->update_closure); jit_ldxi_p(JIT_VHEAP, JIT_FP, sizeof(void*)); jit_movi_p(JIT_R2, gates->evaluate_indirection); jit_str_p(JIT_VHEAP, JIT_R2); @@ -509,7 +509,7 @@ pgf_jit_gates(PgfReader* rdr) gates->mk_const = jit_get_ip().ptr; jit_popr_p(JIT_R0); - ref2 = jit_bnei_i(jit_forward(), JIT_R0, (int)gates->update_closure); + ref2 = jit_bnei_p(jit_forward(), JIT_R0, gates->update_closure); jit_subr_p(JIT_R0, JIT_FP, JIT_SP); jit_pushr_i(JIT_R0); jit_prepare(2); @@ -702,7 +702,7 @@ pgf_jit_function(PgfReader* rdr, PgfAbstr* abstr, gu_printf(out, err, "CASE %s %03d\n", id, target); #endif jit_insn *jump = - jit_bnei_i(jit_forward(), JIT_RET, (int) jit_forward()); + jit_bnei_p(jit_forward(), JIT_RET, jit_forward()); PgfSegmentPatch label_patch; label_patch.segment = target; diff --git a/src/runtime/c/pgf/lightning/core-common.h b/src/runtime/c/pgf/lightning/core-common.h index 3cda23322..3761bcc2b 100644 --- a/src/runtime/c/pgf/lightning/core-common.h +++ b/src/runtime/c/pgf/lightning/core-common.h @@ -427,7 +427,7 @@ typedef union jit_code { #define jit_beqr_p(label, s1, s2) jit_beqr_ul((label), (s1), (s2)) #define jit_beqi_p(label, rs, is) jit_beqi_ul((label), (rs), (is)) #define jit_bner_p(label, s1, s2) jit_bner_ul((label), (s1), (s2)) -#define jit_bnei_p(label, rs, is) jit_bnei_ul((label), (rs), (is)) +#define jit_bnei_p(label, rs, is) jit_bnei_ul((label), (rs), _jit_UL(is)) #define jit_retval_ui(rd) jit_retval_i((rd)) #define jit_retval_uc(rd) jit_retval_i((rd)) diff --git a/src/runtime/c/pgf/lightning/i386/asm.h b/src/runtime/c/pgf/lightning/i386/asm.h index 3d1a1a19b..37c3f7f38 100644 --- a/src/runtime/c/pgf/lightning/i386/asm.h +++ b/src/runtime/c/pgf/lightning/i386/asm.h @@ -905,7 +905,7 @@ enum { /* FIXME: no prefix is availble to encode a 32-bit operand size in 64-bit mode */ #define JMPSm(M) _O_D8 (0xeb ,(int)(M) ) -#define JMPm(M) _O_D32 (0xe9 ,(int)(M) ) +#define JMPm(M) _O_D32 (0xe9 ,(M) ) #define JMPLsr(R) (_REXLrr(0, R), _O_Mrm (0xff ,_b11,_b100,_r4(R) )) #define JMPsm(D,B,I,S) (_REXLrm(0, B, I), _O_r_X (0xff ,_b100 ,(int)(D),B,I,S ))