2
0
Эх сурвалжийг харах

PPC: Avoid undefined operand dereference in BAND/shift fusion.

Mike Pall 14 жил өмнө
parent
commit
a064156d5d
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      src/lj_asm_ppc.h

+ 1 - 1
src/lj_asm_ppc.h

@@ -1490,7 +1490,7 @@ static void asm_fuseandsh(ASMState *as, PPCIns pi, int32_t mask, IRRef ref)
   IRIns *ir;
   Reg left;
   if (mayfuse(as, ref) && (ir = IR(ref), ra_noreg(ir->r)) &&
-      irref_isk(ir->op2)) {
+      irref_isk(ir->op2) && ir->o >= IR_BSHL && ir->o <= IR_BROR) {
     int32_t sh = (IR(ir->op2)->i & 31);
     switch (ir->o) {
     case IR_BSHL: