diff options
-rw-r--r-- | src/lj_asm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index 84c37275..687363e1 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -3801,8 +3801,11 @@ static void asm_setup_regsp(ASMState *as, GCtrace *T) | |||
3801 | break; | 3801 | break; |
3802 | /* Non-constant shift counts need to be in RID_ECX. */ | 3802 | /* Non-constant shift counts need to be in RID_ECX. */ |
3803 | case IR_BSHL: case IR_BSHR: case IR_BSAR: case IR_BROL: case IR_BROR: | 3803 | case IR_BSHL: case IR_BSHR: case IR_BSAR: case IR_BROL: case IR_BROR: |
3804 | if (!irref_isk(ir->op2) && !ra_hashint(IR(ir->op2)->r)) | 3804 | if (!irref_isk(ir->op2) && !ra_hashint(IR(ir->op2)->r)) { |
3805 | IR(ir->op2)->r = REGSP_HINT(RID_ECX); | 3805 | IR(ir->op2)->r = REGSP_HINT(RID_ECX); |
3806 | if (inloop) | ||
3807 | rset_set(as->modset, RID_ECX); | ||
3808 | } | ||
3806 | break; | 3809 | break; |
3807 | /* Do not propagate hints across type conversions. */ | 3810 | /* Do not propagate hints across type conversions. */ |
3808 | case IR_TONUM: case IR_TOINT: case IR_TOBIT: | 3811 | case IR_TONUM: case IR_TOINT: case IR_TOBIT: |