diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2008-06-27 18:39:00 +0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-09-16 19:01:37 +0400 |
commit | 48d6c64311ddb6417b901639530ccbc47bdc7635 (patch) | |
tree | dfdb08412813343a6ee3bb8b57d34b99ec818a27 /include/math-emu/soft-fp.h | |
parent | 40d3057ac036f2501c1930728a6179be4fca577b (diff) | |
download | linux-48d6c64311ddb6417b901639530ccbc47bdc7635.tar.xz |
math-emu: Add support for reporting exact invalid exception
Some architectures (like powerpc) provide status information on the exact
type of invalid exception. This is pretty straight forward as we already
report invalid exceptions via FP_SET_EXCEPTION.
We add new flags (FP_EX_INVALID_*) the architecture code can define if it
wants the exact invalid exception reported.
We had to split out the INF/INF and 0/0 cases for divide to allow reporting
the two invalid forms properly.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/math-emu/soft-fp.h')
-rw-r--r-- | include/math-emu/soft-fp.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/math-emu/soft-fp.h b/include/math-emu/soft-fp.h index a6f873b45f98..3f284bc03180 100644 --- a/include/math-emu/soft-fp.h +++ b/include/math-emu/soft-fp.h @@ -51,6 +51,25 @@ #ifndef FP_EX_INVALID #define FP_EX_INVALID 0 #endif +#ifndef FP_EX_INVALID_SNAN +#define FP_EX_INVALID_SNAN 0 +#endif +/* inf - inf */ +#ifndef FP_EX_INVALID_ISI +#define FP_EX_INVALID_ISI 0 +#endif +/* inf / inf */ +#ifndef FP_EX_INVALID_IDI +#define FP_EX_INVALID_IDI 0 +#endif +/* 0 / 0 */ +#ifndef FP_EX_INVALID_ZDZ +#define FP_EX_INVALID_ZDZ 0 +#endif +/* inf * 0 */ +#ifndef FP_EX_INVALID_IMZ +#define FP_EX_INVALID_IMZ 0 +#endif #ifndef FP_EX_OVERFLOW #define FP_EX_OVERFLOW 0 #endif |