diff options
Diffstat (limited to 'src/lj_asm.c')
-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 93f6bcd6..94d7bfc4 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -2150,7 +2150,10 @@ static void asm_setup_regsp(ASMState *as) | |||
2150 | #endif | 2150 | #endif |
2151 | #if LJ_TARGET_X86ORX64 | 2151 | #if LJ_TARGET_X86ORX64 |
2152 | /* Non-constant shift counts need to be in RID_ECX on x86/x64. */ | 2152 | /* Non-constant shift counts need to be in RID_ECX on x86/x64. */ |
2153 | case IR_BSHL: case IR_BSHR: case IR_BSAR: case IR_BROL: case IR_BROR: | 2153 | case IR_BSHL: case IR_BSHR: case IR_BSAR: |
2154 | if ((as->flags & JIT_F_BMI2)) /* Except if BMI2 is available. */ | ||
2155 | break; | ||
2156 | case IR_BROL: case IR_BROR: | ||
2154 | if (!irref_isk(ir->op2) && !ra_hashint(IR(ir->op2)->r)) { | 2157 | if (!irref_isk(ir->op2) && !ra_hashint(IR(ir->op2)->r)) { |
2155 | IR(ir->op2)->r = REGSP_HINT(RID_ECX); | 2158 | IR(ir->op2)->r = REGSP_HINT(RID_ECX); |
2156 | if (inloop) | 2159 | if (inloop) |