提交 68893e00 编写于 作者: M Maciej W. Rozycki 提交者: Ralf Baechle

MIPS: Correct MIPS16 BREAK code interpretation

Correct the interpretation of the immediate MIPS16 BREAK instruction
code embedded in the instruction word across bits 10:5 rather than 11:6
as current code implies, fixing the interpretation of integer overflow
and divide by zero traps.
Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9695/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 18a2c2c6
......@@ -925,7 +925,7 @@ asmlinkage void do_bp(struct pt_regs *regs)
if (__get_user(instr[0],
(u16 __user *)msk_isa16_mode(epc)))
goto out_sigsegv;
bcode = (instr[0] >> 6) & 0x3f;
bcode = (instr[0] >> 5) & 0x3f;
do_trap_or_bp(regs, bcode, "Break");
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册