aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lj_crecord.c7
-rw-r--r--src/lj_snap.c2
2 files changed, 3 insertions, 6 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c
index 55d76ca0..e88e3579 100644
--- a/src/lj_crecord.c
+++ b/src/lj_crecord.c
@@ -126,11 +126,6 @@ static IRType crec_ct2irt(CTState *cts, CType *ct)
126#define CREC_COPY_MAXLEN 128 126#define CREC_COPY_MAXLEN 128
127 127
128#define CREC_FILL_MAXUNROLL 16 128#define CREC_FILL_MAXUNROLL 16
129#if LJ_TARGET_UNALIGNED
130#define CREC_FILL_MAXLEN (CTSIZE_PTR * CREC_FILL_MAXUNROLL)
131#else
132#define CREC_FILL_MAXLEN CREC_FILL_MAXUNROLL
133#endif
134 129
135/* Number of windowed registers used for optimized memory copy. */ 130/* Number of windowed registers used for optimized memory copy. */
136#if LJ_TARGET_X86 131#if LJ_TARGET_X86
@@ -321,9 +316,9 @@ static void crec_fill(jit_State *J, TRef trdst, TRef trlen, TRef trfill,
321 MSize mlp; 316 MSize mlp;
322 CTSize len = (CTSize)IR(tref_ref(trlen))->i; 317 CTSize len = (CTSize)IR(tref_ref(trlen))->i;
323 if (len == 0) return; /* Shortcut. */ 318 if (len == 0) return; /* Shortcut. */
324 if (len > CREC_FILL_MAXLEN) goto fallback;
325 if (LJ_TARGET_UNALIGNED || step >= CTSIZE_PTR) 319 if (LJ_TARGET_UNALIGNED || step >= CTSIZE_PTR)
326 step = CTSIZE_PTR; 320 step = CTSIZE_PTR;
321 if (step * CREC_FILL_MAXUNROLL < len) goto fallback;
327 mlp = crec_fill_unroll(ml, len, step); 322 mlp = crec_fill_unroll(ml, len, step);
328 if (!mlp) goto fallback; 323 if (!mlp) goto fallback;
329 if (tref_isk(trfill) || ml[0].tp != IRT_U8) 324 if (tref_isk(trfill) || ml[0].tp != IRT_U8)
diff --git a/src/lj_snap.c b/src/lj_snap.c
index aea6102c..30ff9152 100644
--- a/src/lj_snap.c
+++ b/src/lj_snap.c
@@ -564,6 +564,8 @@ void lj_snap_replay(jit_State *J, GCtrace *T)
564 continue; 564 continue;
565 } 565 }
566 tmp = emitir(irs->ot, tmp, val); 566 tmp = emitir(irs->ot, tmp, val);
567 } else if (LJ_HASFFI && irs->o == IR_XBAR && ir->o == IR_CNEW) {
568 emitir(IRT(IR_XBAR, IRT_NIL), 0, 0);
567 } 569 }
568 } 570 }
569 } 571 }