• Aleksandar Markovic's avatar
    MIPS: math-emu: Fix final emulation phase for certain instructions · 085d6651
    Aleksandar Markovic authored
    commit 409fcace upstream.
    
    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: 38db37ba ("MIPS: math-emu: Add support for the MIPS R6 CLASS FPU instruction")
    Fixes: e24c3bec ("MIPS: math-emu: Add support for the MIPS R6 MADDF FPU instruction")
    Fixes: 83d43305 ("MIPS: math-emu: Add support for the MIPS R6 MSUBF FPU instruction")
    Fixes: a79f5f9b ("MIPS: math-emu: Add support for the MIPS R6 MAX{, A} FPU instruction")
    Fixes: 4e9561b2 ("MIPS: math-emu: Add support for the MIPS R6 MIN{, A} FPU instruction")
    Signed-off-by: default avatarAleksandar 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
    Patchwork: https://patchwork.linux-mips.org/patch/17581/Signed-off-by: default avatarJames Hogan <jhogan@kernel.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    085d6651
Name
Last commit
Last update
..
alchemy Loading commit data...
ar7 Loading commit data...
ath25 Loading commit data...
ath79 Loading commit data...
bcm47xx Loading commit data...
bcm63xx Loading commit data...
bmips Loading commit data...
boot Loading commit data...
cavium-octeon Loading commit data...
cobalt Loading commit data...
configs Loading commit data...
dec Loading commit data...
emma Loading commit data...
fw Loading commit data...
generic Loading commit data...
include Loading commit data...
jazz Loading commit data...
jz4740 Loading commit data...
kernel Loading commit data...
kvm Loading commit data...
lantiq Loading commit data...
lasat Loading commit data...
lib Loading commit data...
loongson32 Loading commit data...
loongson64 Loading commit data...
math-emu Loading commit data...
mm Loading commit data...
mti-malta Loading commit data...
net Loading commit data...
netlogic Loading commit data...
oprofile Loading commit data...
paravirt Loading commit data...
pci Loading commit data...
pic32 Loading commit data...
pistachio Loading commit data...
pmcs-msp71xx Loading commit data...
pnx833x Loading commit data...
power Loading commit data...
ralink Loading commit data...
rb532 Loading commit data...
sgi-ip22 Loading commit data...
sgi-ip27 Loading commit data...
sgi-ip32 Loading commit data...
sibyte Loading commit data...
sni Loading commit data...
tools Loading commit data...
txx9 Loading commit data...
vdso Loading commit data...
vr41xx Loading commit data...
xilfpga Loading commit data...
Kbuild Loading commit data...
Kbuild.platforms Loading commit data...
Kconfig Loading commit data...
Kconfig.debug Loading commit data...
Makefile Loading commit data...
Makefile.postlink Loading commit data...