Skip to content

Commit

Permalink
math-emu: Fix thinko in _FP_DIV
Browse files Browse the repository at this point in the history
In commit 48d6c64 ("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: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Oct 23, 2008
1 parent 930cc14 commit 60b8267
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/math-emu/op-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,8 @@ do { \
R##_c = FP_CLS_NAN; \
_FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_IDI);\
break; \
\
case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_ZERO): \
R##_s = _FP_NANSIGN_##fs; \
R##_c = FP_CLS_NAN; \
Expand Down

0 comments on commit 60b8267

Please sign in to comment.