MIPS: math-emu: Handle zero accumulator case in MADDF and MSUBF separately
authorAleksandar Markovic <aleksandar.markovic@imgtec.com>
Mon, 19 Jun 2017 15:50:12 +0000 (17:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Sep 2017 12:39:20 +0000 (14:39 +0200)
commit4e0694a6411b2a6e3cc1265ed6726c353ea73181
tree81fc00e1b76265366c1f0c4ac0ed1c61967b24e1
parent9381a991a36ad5fa7073f87172a859e9635e88e4
MIPS: math-emu: Handle zero accumulator case in MADDF and MSUBF separately

commit ddbfff7429a75d954bf5bdff9f2222bceb4c236a upstream.

If accumulator value is zero, just return the value of previously
calculated product. This brings logic in MADDF/MSUBF implementation
closer to the logic in ADD/SUB case.

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: James.Hogan@imgtec.com
Cc: Paul.Burton@imgtec.com
Cc: Raghu.Gandham@imgtec.com
Cc: Leonid.Yegoshin@imgtec.com
Cc: Douglas.Leung@imgtec.com
Cc: Petar.Jovanovic@imgtec.com
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16512/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/math-emu/dp_maddf.c
arch/mips/math-emu/sp_maddf.c