Skip to content

Commit 60b8267

Browse files
committed
math-emu: Fix thinko in _FP_DIV
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]>
1 parent 930cc14 commit 60b8267

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/math-emu/op-common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,8 @@ do { \
503503
R##_c = FP_CLS_NAN; \
504504
_FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
505505
FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_IDI);\
506+
break; \
507+
\
506508
case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_ZERO): \
507509
R##_s = _FP_NANSIGN_##fs; \
508510
R##_c = FP_CLS_NAN; \

0 commit comments

Comments
 (0)