diff options
-rw-r--r-- | src/lj_asm.c | 1 | ||||
-rw-r--r-- | src/lj_ir.h | 4 | ||||
-rw-r--r-- | src/lj_opt_sink.c | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index d961927b..753fe6bd 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -2015,6 +2015,7 @@ static void asm_setup_regsp(ASMState *as) | |||
2015 | ir->prev = REGSP_INIT; | 2015 | ir->prev = REGSP_INIT; |
2016 | if (irt_is64(ir->t) && ir->o != IR_KNULL) { | 2016 | if (irt_is64(ir->t) && ir->o != IR_KNULL) { |
2017 | #if LJ_GC64 | 2017 | #if LJ_GC64 |
2018 | /* The false-positive of irt_is64() for ASMREF_L (REF_NIL) is OK here. */ | ||
2018 | ir->i = 0; /* Will become non-zero only for RIP-relative addresses. */ | 2019 | ir->i = 0; /* Will become non-zero only for RIP-relative addresses. */ |
2019 | #else | 2020 | #else |
2020 | /* Make life easier for backends by putting address of constant in i. */ | 2021 | /* Make life easier for backends by putting address of constant in i. */ |
diff --git a/src/lj_ir.h b/src/lj_ir.h index 34c27853..8057a750 100644 --- a/src/lj_ir.h +++ b/src/lj_ir.h | |||
@@ -377,10 +377,12 @@ typedef struct IRType1 { uint8_t irt; } IRType1; | |||
377 | #define irt_isint64(t) (irt_typerange((t), IRT_I64, IRT_U64)) | 377 | #define irt_isint64(t) (irt_typerange((t), IRT_I64, IRT_U64)) |
378 | 378 | ||
379 | #if LJ_GC64 | 379 | #if LJ_GC64 |
380 | /* Include IRT_NIL, so IR(ASMREF_L) (aka REF_NIL) is considered 64 bit. */ | ||
380 | #define IRT_IS64 \ | 381 | #define IRT_IS64 \ |
381 | ((1u<<IRT_NUM)|(1u<<IRT_I64)|(1u<<IRT_U64)|(1u<<IRT_P64)|\ | 382 | ((1u<<IRT_NUM)|(1u<<IRT_I64)|(1u<<IRT_U64)|(1u<<IRT_P64)|\ |
382 | (1u<<IRT_LIGHTUD)|(1u<<IRT_STR)|(1u<<IRT_THREAD)|(1u<<IRT_PROTO)|\ | 383 | (1u<<IRT_LIGHTUD)|(1u<<IRT_STR)|(1u<<IRT_THREAD)|(1u<<IRT_PROTO)|\ |
383 | (1u<<IRT_FUNC)|(1u<<IRT_CDATA)|(1u<<IRT_TAB)|(1u<<IRT_UDATA)) | 384 | (1u<<IRT_FUNC)|(1u<<IRT_CDATA)|(1u<<IRT_TAB)|(1u<<IRT_UDATA)|\ |
385 | (1u<<IRT_NIL)) | ||
384 | #elif LJ_64 | 386 | #elif LJ_64 |
385 | #define IRT_IS64 \ | 387 | #define IRT_IS64 \ |
386 | ((1u<<IRT_NUM)|(1u<<IRT_I64)|(1u<<IRT_U64)|(1u<<IRT_P64)|(1u<<IRT_LIGHTUD)) | 388 | ((1u<<IRT_NUM)|(1u<<IRT_I64)|(1u<<IRT_U64)|(1u<<IRT_P64)|(1u<<IRT_LIGHTUD)) |
diff --git a/src/lj_opt_sink.c b/src/lj_opt_sink.c index 929ccb61..a16d112f 100644 --- a/src/lj_opt_sink.c +++ b/src/lj_opt_sink.c | |||
@@ -219,6 +219,7 @@ static void sink_sweep_ins(jit_State *J) | |||
219 | for (ir = IR(J->cur.nk); ir < irbase; ir++) { | 219 | for (ir = IR(J->cur.nk); ir < irbase; ir++) { |
220 | irt_clearmark(ir->t); | 220 | irt_clearmark(ir->t); |
221 | ir->prev = REGSP_INIT; | 221 | ir->prev = REGSP_INIT; |
222 | /* The false-positive of irt_is64() for ASMREF_L (REF_NIL) is OK here. */ | ||
222 | if (irt_is64(ir->t) && ir->o != IR_KNULL) | 223 | if (irt_is64(ir->t) && ir->o != IR_KNULL) |
223 | ir++; | 224 | ir++; |
224 | } | 225 | } |