]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: math-emu: Fix m{add,sub}.s shifts
authorPaul Burton <paul.burton@imgtec.com>
Thu, 21 Apr 2016 13:04:54 +0000 (14:04 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 13 May 2016 12:02:23 +0000 (14:02 +0200)
commitc2e7ae6fd87dd27c07b9dc6bad62876a9cfeccd6
tree0811a8ef970725d4fe6d22c27d3987fcaf455fa5
parente0b05e97d15692342276dae5b57e26c1841f1eb1
MIPS: math-emu: Fix m{add,sub}.s shifts

The code in _sp_maddf (formerly ieee754sp_madd) appears to have been
copied verbatim from ieee754sp_add, and although it's adding the
unpacked "r" & "z" floats it kept using macros that operate on "x" &
"y". This led to the addition being carried out incorrectly on some
mismash of the product, accumulator & multiplicand fields. Typically
this would lead to the assertions "ze == re" & "ze <= SP_EMAX" failing
since ze & re hadn't been operated upon.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Fixes: 439a36e5a818 ("MIPS: math-emu: Add support for the MIPS R6 MADDF FPU instruction")
Cc: Adam Buchbinder <adam.buchbinder@gmail.com>
Cc: Maciej W. Rozycki <macro@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/13159/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/math-emu/ieee754sp.c
arch/mips/math-emu/ieee754sp.h
arch/mips/math-emu/sp_add.c
arch/mips/math-emu/sp_maddf.c
arch/mips/math-emu/sp_sub.c