summaryrefslogtreecommitdiff
path: root/arch/nds32/Kconfig.cpu
diff options
context:
space:
mode:
authorVincent Chen <vincentc@andestech.com>2018-11-22 06:14:36 +0300
committerGreentime Hu <greentime@andestech.com>2018-11-22 13:13:27 +0300
commit44e92e0364adfd7b6759084e02a550d06336d896 (patch)
tree4fb8af79a5ce25f9467bdc22f44e67f6ae42b6d6 /arch/nds32/Kconfig.cpu
parent1ac832509f2ea1b566f0c06f98f308f58b03d098 (diff)
downloadlinux-44e92e0364adfd7b6759084e02a550d06336d896.tar.xz
nds32: support denormalized result through FP emulator
Currently, the nds32 FPU dose not support the arithmetic of denormalized number. When the nds32 FPU finds the result of the instruction is a denormlized number, the nds32 FPU considers it to be an underflow condition and rounds the result to an appropriate number. It may causes some loss of precision. This commit proposes a solution to re-execute the instruction by the FPU emulator to enhance the precision. To transfer calculations from user space to kernel space, this feature will enable the underflow exception trap by default. Enabling this feature may cause some side effects: 1. Performance loss due to extra FPU exception 2. Need another scheme to control real underflow trap A new parameter, UDF_trap, which is belong to FPU context is used to control underflow trap. User can configure this feature via CONFIG_SUPPORT_DENORMAL_ARITHMETIC Signed-off-by: Vincent Chen <vincentc@andestech.com> Acked-by: Greentime Hu <greentime@andestech.com> Signed-off-by: Greentime Hu <greentime@andestech.com>
Diffstat (limited to 'arch/nds32/Kconfig.cpu')
-rw-r--r--arch/nds32/Kconfig.cpu13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/nds32/Kconfig.cpu b/arch/nds32/Kconfig.cpu
index bb06a1b7eef0..6482ed877f97 100644
--- a/arch/nds32/Kconfig.cpu
+++ b/arch/nds32/Kconfig.cpu
@@ -28,6 +28,19 @@ config LAZY_FPU
For nomal case, say Y.
+config SUPPORT_DENORMAL_ARITHMETIC
+ bool "Denormal arithmetic support"
+ depends on FPU
+ default n
+ help
+ Say Y here to enable arithmetic of denormalized number. Enabling
+ this feature can enhance the precision for tininess number.
+ However, performance loss in float pointe calculations is
+ possibly significant due to additional FPU exception.
+
+ If the calculated tolerance for tininess number is not critical,
+ say N to prevent performance loss.
+
config HWZOL
bool "hardware zero overhead loop support"
depends on CPU_D10 || CPU_D15