math-emu: Fix thinko in _FP_DIV
authorDavid S. Miller <davem@davemloft.net>
Thu, 23 Oct 2008 05:09:59 +0000 (22:09 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Oct 2008 05:09:59 +0000 (22:09 -0700)
In commit 48d6c64311ddb6417b901639530ccbc47bdc7635 ("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 <davem@davemloft.net>
include/math-emu/op-common.h

index bc50aa0d6d73c1a590b3cee3e56da2d2326d7491..f456534dcaf92615e4b6778bd17de23f227a5578 100644 (file)
@@ -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;                                        \