Commit 60b82673 authored by David S. Miller's avatar David S. Miller

math-emu: Fix thinko in _FP_DIV

In commit 48d6c643 ("math-emu: Add
support for reporting exact invalid exception") code was added to
set the new FP_EX_INVALID_{IDI,ZDZ} exception flag bits.

However there is a missing break statement for the
_FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_INF) switch case, the
code just falls into _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_ZERO)
which then proceeds to overwrite all of the settings.

Fix by adding the missing break.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 930cc144
...@@ -503,6 +503,8 @@ do { \ ...@@ -503,6 +503,8 @@ do { \
R##_c = FP_CLS_NAN; \ R##_c = FP_CLS_NAN; \
_FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \ _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_IDI);\ FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_IDI);\
break; \
\
case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_ZERO): \ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_ZERO): \
R##_s = _FP_NANSIGN_##fs; \ R##_s = _FP_NANSIGN_##fs; \
R##_c = FP_CLS_NAN; \ R##_c = FP_CLS_NAN; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment