diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_crecord.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c index e3973fc1..8577de2c 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c | |||
| @@ -125,11 +125,6 @@ static IRType crec_ct2irt(CTState *cts, CType *ct) | |||
| 125 | #define CREC_COPY_MAXLEN 128 | 125 | #define CREC_COPY_MAXLEN 128 |
| 126 | 126 | ||
| 127 | #define CREC_FILL_MAXUNROLL 16 | 127 | #define CREC_FILL_MAXUNROLL 16 |
| 128 | #if LJ_TARGET_UNALIGNED | ||
| 129 | #define CREC_FILL_MAXLEN (CTSIZE_PTR * CREC_FILL_MAXUNROLL) | ||
| 130 | #else | ||
| 131 | #define CREC_FILL_MAXLEN CREC_FILL_MAXUNROLL | ||
| 132 | #endif | ||
| 133 | 128 | ||
| 134 | /* Number of windowed registers used for optimized memory copy. */ | 129 | /* Number of windowed registers used for optimized memory copy. */ |
| 135 | #if LJ_TARGET_X86 | 130 | #if LJ_TARGET_X86 |
| @@ -320,9 +315,9 @@ static void crec_fill(jit_State *J, TRef trdst, TRef trlen, TRef trfill, | |||
| 320 | MSize mlp; | 315 | MSize mlp; |
| 321 | CTSize len = (CTSize)IR(tref_ref(trlen))->i; | 316 | CTSize len = (CTSize)IR(tref_ref(trlen))->i; |
| 322 | if (len == 0) return; /* Shortcut. */ | 317 | if (len == 0) return; /* Shortcut. */ |
| 323 | if (len > CREC_FILL_MAXLEN) goto fallback; | ||
| 324 | if (LJ_TARGET_UNALIGNED || step >= CTSIZE_PTR) | 318 | if (LJ_TARGET_UNALIGNED || step >= CTSIZE_PTR) |
| 325 | step = CTSIZE_PTR; | 319 | step = CTSIZE_PTR; |
| 320 | if (step * CREC_FILL_MAXUNROLL < len) goto fallback; | ||
| 326 | mlp = crec_fill_unroll(ml, len, step); | 321 | mlp = crec_fill_unroll(ml, len, step); |
| 327 | if (!mlp) goto fallback; | 322 | if (!mlp) goto fallback; |
| 328 | if (tref_isk(trfill) || ml[0].tp != IRT_U8) | 323 | if (tref_isk(trfill) || ml[0].tp != IRT_U8) |
