OSDN Git Service

MIPS: R2-on-R6 MULTU/MADDU/MSUBU emulation bugfix
authorLeonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Thu, 25 Aug 2016 17:37:38 +0000 (10:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 May 2017 12:00:20 +0000 (14:00 +0200)
commitb0e2e3acfe8ebe95e9d6189b94e75d685c7f6d15
tree473cb7ed821e8b2085bd7f678697e1ba6eecd32d
parent2d652d0abd3ccda1097345d13d728b8ba1b7c68f
MIPS: R2-on-R6 MULTU/MADDU/MSUBU emulation bugfix

commit d65e5677ad5b3a49c43f60ec07644dc1f87bbd2e upstream.

MIPS instructions MULTU, MADDU and MSUBU emulation requires registers HI/LO
to be converted to signed 32bits before 64bit sign extension on MIPS64.

Bug was found on running MIPS32 R2 test application on MIPS64 R6 kernel.

Fixes: b0a668fb2038 ("MIPS: kernel: mips-r2-to-r6-emul: Add R2 emulator for MIPS R6")
Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Reported-by: Nikola.Veljkovic@imgtec.com
Cc: paul.burton@imgtec.com
Cc: yamada.masahiro@socionext.com
Cc: akpm@linux-foundation.org
Cc: andrea.gelmini@gelma.net
Cc: macro@imgtec.com
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14043/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/kernel/mips-r2-to-r6-emul.c