]> asedeno.scripts.mit.edu Git - linux.git/commit
nds32: Avoid IEX status being incorrectly modified
authorVincent Chen <vincentc@andestech.com>
Mon, 20 May 2019 01:21:12 +0000 (09:21 +0800)
committerGreentime Hu <greentime@andestech.com>
Fri, 31 May 2019 07:23:26 +0000 (15:23 +0800)
commited32949e0acb73e7bc054bb02e0453d4d561ceda
treef582241cdd3450e01fe6d1cf508a3e3a8211c675
parent8183db10db6377ac58ad048a4c827425a614695c
nds32: Avoid IEX status being incorrectly modified

In order for kernel to capture each denormalized output, the UDF
trapping enable bit is always raised in $fpcsr. Because underflow case will
issue not an underflow exception but also an inexact exception, it causes
that the IEX, IEX cumulative exception, flag in $fpcsr to be raised in each
denormalized output handling. To make the emulation transparent to the
user, the emulator needs to clear the IEX flag in $fpcsr if the result is a
denormalized number. However, if the IEX flag has been raised before this
floating point emulation, this cleanup may be incorrect. To avoid the IEX
flags in $fpcsr be raised in each denormalized output handling, the IEX
trap shall be always enabled.

Signed-off-by: Vincent Chen <vincentc@andestech.com>
Acked-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
arch/nds32/include/asm/bitfield.h
arch/nds32/include/asm/fpu.h
arch/nds32/include/asm/syscalls.h
arch/nds32/include/uapi/asm/fp_udfiex_crtl.h [new file with mode: 0644]
arch/nds32/include/uapi/asm/sigcontext.h
arch/nds32/include/uapi/asm/udftrap.h [deleted file]
arch/nds32/include/uapi/asm/unistd.h
arch/nds32/kernel/fpu.c
arch/nds32/kernel/sys_nds32.c