summaryrefslogtreecommitdiff
path: root/arch/tile
diff options
context:
space:
mode:
authorDouglas Leung <douglas.leung@imgtec.com>2017-07-27 16:08:58 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-27 12:39:20 (GMT)
commitd2b488ee6f63d82bc39fa3199d6a5c71bec5ee4a (patch)
tree9ec53e9d3559c592eb15ae759b7000c7d4ad39ca /arch/tile
parent5cabf999fdb74cc5eddd463f63c5a559f0f784c0 (diff)
downloadlinux-d2b488ee6f63d82bc39fa3199d6a5c71bec5ee4a.tar.xz
MIPS: math-emu: <MADDF|MSUBF>.S: Fix accuracy (32-bit case)
commit b3b8e1eb27c523e32b6a8aa7ec8ac4754456af57 upstream. Implement fused multiply-add with correct accuracy. Fused multiply-add operation has better accuracy than respective sequential execution of multiply and add operations applied on the same inputs. This is because accuracy errors accumulate in latter case. This patch implements fused multiply-add with the same accuracy as it is implemented in hardware, using 64-bit intermediate calculations. One test case example (raw bits) that this patch fixes: MADDF.S fd,fs,ft: fd = 0x22575225 fs = ft = 0x3727c5ac Fixes: e24c3bec3e8e ("MIPS: math-emu: Add support for the MIPS R6 MADDF FPU instruction") Fixes: 83d43305a1df ("MIPS: math-emu: Add support for the MIPS R6 MSUBF FPU instruction") Signed-off-by: Douglas Leung <douglas.leung@imgtec.com> Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com> Signed-off-by: Goran Ferenc <goran.ferenc@imgtec.com> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com> Cc: Douglas Leung <douglas.leung@imgtec.com> Cc: Bo Hu <bohu@google.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Jin Qian <jinqian@google.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Petar Jovanovic <petar.jovanovic@imgtec.com> Cc: Raghu Gandham <raghu.gandham@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16890/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/tile')
0 files changed, 0 insertions, 0 deletions