break;
case OP_LUI:
- lightrec_modify_lui(block, i);
+ if (!prev || !has_delay_slot(prev->c))
+ lightrec_modify_lui(block, i);
lightrec_remove_useless_lui(block, i, known, values);
break;
op->i.op = OP_META_MOV;
op->r.rs = op->r.rt;
}
- case OP_SPECIAL_SUB: /* fall-through */
+ fallthrough;
+ case OP_SPECIAL_SUB:
case OP_SPECIAL_SUBU:
if (op->r.rt == 0) {
pr_debug("Convert OR/ADD/SUB $zero to MOV\n");
op->i.op = OP_META_MOV;
}
- default: /* fall-through */
+ fallthrough;
+ default:
break;
}
- default: /* fall-through */
+ fallthrough;
+ default:
break;
}
}
if (opcode_reads_register(next_op, op.r.rd) ||
opcode_writes_register(next_op, op.r.rd))
continue;
- case OP_SPECIAL_JR: /* fall-through */
+ fallthrough;
+ case OP_SPECIAL_JR:
if (opcode_writes_register(next_op, op.r.rs))
continue;
- default: /* fall-through */
+ fallthrough;
+ default:
break;
}
- case OP_J: /* fall-through */
+ fallthrough;
+ case OP_J:
break;
case OP_JAL:
if (opcode_reads_register(next_op, 31) ||
case OP_BNE:
if (op.i.rt && opcode_writes_register(next_op, op.i.rt))
continue;
- case OP_BLEZ: /* fall-through */
+ fallthrough;
+ case OP_BLEZ:
case OP_BGTZ:
if (op.i.rs && opcode_writes_register(next_op, op.i.rs))
continue;
if (opcode_reads_register(next_op, 31) ||
opcode_writes_register(next_op, 31))
continue;
- case OP_REGIMM_BLTZ: /* fall-through */
+ fallthrough;
+ case OP_REGIMM_BLTZ:
case OP_REGIMM_BGEZ:
if (op.i.rs &&
opcode_writes_register(next_op, op.i.rs))
continue;
break;
}
- default: /* fall-through */
+ fallthrough;
+ default:
break;
}
offset = i + 1 + (s16)list->i.imm;
if (offset >= 0 && offset < block->nb_ops)
break;
- default: /* fall-through */
+ fallthrough;
+ default:
continue;
}
list->flags |= LIGHTREC_SMC;
}
}
- case OP_SWL: /* fall-through */
+ fallthrough;
+ case OP_SWL:
case OP_SWR:
case OP_SWC2:
case OP_LB:
case PSX_MAP_KERNEL_USER_RAM:
if (val == kunseg_val)
list->flags |= LIGHTREC_NO_MASK;
- /* fall-through */
+ fallthrough;
case PSX_MAP_MIRROR1:
case PSX_MAP_MIRROR2:
case PSX_MAP_MIRROR3:
break;
}
}
- default: /* fall-through */
+ fallthrough;
+ default:
break;
}
}
break;
}
- /* fall-through */
+ fallthrough;
default:
continue;
}
return;
}
- /* fall-through */
+ fallthrough;
default:
break;
}
if (lightrec_always_skip_div_check() ||
(known & BIT(list->c.r.rt) && values[list->c.r.rt]))
list->flags |= LIGHTREC_NO_DIV_CHECK;
- case OP_SPECIAL_MULT: /* fall-through */
+ fallthrough;
+ case OP_SPECIAL_MULT:
case OP_SPECIAL_MULTU:
break;
default: