]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Fix branch emulation for BLTC and BGEC instructions
authorMarkos Chandras <markos.chandras@imgtec.com>
Wed, 24 Jun 2015 08:52:00 +0000 (09:52 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 9 Jul 2015 09:10:40 +0000 (11:10 +0200)
commitddd2fe18a0122e6c1f4cb62fead4a396f0051803
tree88be5c061e84c8f00c0ccf3319f25f5c4fda3584
parent9fb764c03324ea59d67f2091503e6a8b1860fc75
MIPS: Fix branch emulation for BLTC and BGEC instructions

Commits 6e8415d9a6f0ca6832944d73d8926c0997c1fa20 ("MIPS: Emulate the
new MIPS R6 B{L,G}T{Z,}{AL,}C instructions") and commit
497a908bb63041e4f60665600d2341a276bd47a2 ("MIPS: Emulate the new MIPS
R6 B{L,G}E{Z,}{AL,}C instructions") added support for emulating various
branch compact instructions. However, it missed the case for those which
use the old BLEZL and BGTZL opcodes leading to random crashes when the R6
emulator is disabled. We fix this by ensuring that the 'rt' field is not
zero which is always true for these branch compact instructions.

Fixes: 6e8415d9a6f0 ("MIPS: Emulate the new MIPS R6 B{L,G}T{Z,}{AL,}C instructions")
Fixes: 497a908bb630 ("MIPS: Emulate the new MIPS R6 B{L,G}E{Z,}{AL,}C instructions")
Cc: <stable@vger.kernel.org> # 4.0+
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Markos Chandras <markos.chandras@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/10582/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/branch.c
arch/mips/math-emu/cp1emu.c