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 11:32:57 +0000 (13:32 +0200)
commit0112db0b9a7779aa83f14ec30c8262aca2e84166
treeed9ea9c71d95208a8cb9459aebd02a3cca2d3edd
parent304b69247e62831f318d5c04f1f9f5d7133f92ce
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