1
0
Fork 0
alistair23-linux/arch
Aleksandar Markovic 409fcace99 MIPS: math-emu: Fix final emulation phase for certain instructions
Fix final phase of <CLASS|MADDF|MSUBF|MAX|MIN|MAXA|MINA>.<D|S>
emulation. Provide proper generation of SIGFPE signal and updating
debugfs FP exception stats in cases of any exception flags set in
preceding phases of emulation.

CLASS.<D|S> instruction may generate "Unimplemented Operation" FP
exception. <MADDF|MSUBF>.<D|S> instructions may generate "Inexact",
"Unimplemented Operation", "Invalid Operation", "Overflow", and
"Underflow" FP exceptions. <MAX|MIN|MAXA|MINA>.<D|S> instructions
can generate "Unimplemented Operation" and "Invalid Operation" FP
exceptions.

The proper final processing of the cases when any FP exception
flag is set is achieved by replacing "break" statement with "goto
copcsr" statement. With such solution, this patch brings the final
phase of emulation of the above instructions consistent with the
one corresponding to the previously implemented emulation of other
related FPU instructions (ADD, SUB, etc.).

Fixes: 38db37ba06 ("MIPS: math-emu: Add support for the MIPS R6 CLASS FPU instruction")
Fixes: e24c3bec3e ("MIPS: math-emu: Add support for the MIPS R6 MADDF FPU instruction")
Fixes: 83d43305a1 ("MIPS: math-emu: Add support for the MIPS R6 MSUBF FPU instruction")
Fixes: a79f5f9ba5 ("MIPS: math-emu: Add support for the MIPS R6 MAX{, A} FPU instruction")
Fixes: 4e9561b20e ("MIPS: math-emu: Add support for the MIPS R6 MIN{, A} FPU instruction")
Signed-off-by: Aleksandar Markovic <aleksandar.markovic@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Douglas Leung <douglas.leung@mips.com>
Cc: Goran Ferenc <goran.ferenc@mips.com>
Cc: "Maciej W. Rozycki" <macro@imgtec.com>
Cc: Miodrag Dinic <miodrag.dinic@mips.com>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petar Jovanovic <petar.jovanovic@mips.com>
Cc: Raghu Gandham <raghu.gandham@mips.com>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 4.3+
Patchwork: https://patchwork.linux-mips.org/patch/17581/
Signed-off-by: James Hogan <jhogan@kernel.org>
2017-11-07 18:33:15 +00:00
..
alpha alpha: fix build failures 2017-10-03 17:54:23 -07:00
arc ARC: [plat-hsdk]: Add reset controller node to manage ethernet reset 2017-10-06 08:59:54 -07:00
arm STM32 fixes for v4.14: 2017-10-04 10:31:00 -07:00
arm64 arm64 fixes: 2017-10-06 11:31:46 -07:00
blackfin Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2017-09-11 18:34:47 -07:00
c6x arch: remove unused *_segments() macros/functions 2017-09-22 12:59:52 -10:00
cris MTD changes for 4.14: 2017-09-09 14:48:21 -07:00
frv arch: remove unused *_segments() macros/functions 2017-09-22 12:59:52 -10:00
h8300 arch: define CPU_BIG_ENDIAN for all fixed big endian archs 2017-09-08 18:26:48 -07:00
hexagon Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 11:52:29 -07:00
ia64 Merge branch 'work.ipc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-09-14 17:37:26 -07:00
m32r m32r: fix build failure 2017-10-03 17:54:26 -07:00
m68k Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2017-09-10 21:07:39 -07:00
metag arch: remove unused *_segments() macros/functions 2017-09-22 12:59:52 -10:00
microblaze arch: change default endian for microblaze 2017-09-25 15:31:26 +02:00
mips MIPS: math-emu: Fix final emulation phase for certain instructions 2017-11-07 18:33:15 +00:00
mn10300 arch: remove unused *_segments() macros/functions 2017-09-22 12:59:52 -10:00
nios2 nios2 update for v4.14-rc1 2017-09-15 12:47:21 -07:00
openrisc OpenRISC patches for 4.14 2017-09-13 11:52:18 -07:00
parisc Merge branch 'core-watchdog-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-10-06 08:36:41 -07:00
powerpc KVM fixes for v4.14-rc4 2017-10-06 11:28:34 -07:00
s390 s390/topology: enable / disable topology dynamically 2017-09-20 13:47:55 +02:00
score Merge branch 'uaccess.strlen' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-06 22:07:44 -07:00
sh sh: sh7269: remove nonexistent GPIO_PH[0-7] to fix pinctrl registration 2017-10-03 17:54:24 -07:00
sparc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2017-09-11 18:34:47 -07:00
tile Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2017-09-22 13:02:54 -10:00
um um/time: Fixup namespace collision 2017-09-29 10:07:44 +02:00
unicore32 unicore32/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks 2017-08-03 16:29:34 -05:00
x86 KVM fixes for v4.14-rc4 2017-10-06 11:28:34 -07:00
xtensa arch: remove unused *_segments() macros/functions 2017-09-22 12:59:52 -10:00
.gitignore
Kconfig - For the randstruct plugin, enable automatic randomization of structures 2017-09-07 20:30:19 -07:00