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)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 3 Jan 2017 15:34:41 +0000 (16:34 +0100)
commitd65e5677ad5b3a49c43f60ec07644dc1f87bbd2e
tree7c9d88ae587250d7756dfe48164052ab842c259a
parent1d79bf0e908202e3141c37d0ad89020ea93ad38a
MIPS: R2-on-R6 MULTU/MADDU/MSUBU emulation bugfix

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>
arch/mips/kernel/mips-r2-to-r6-emul.c