diff options
Diffstat (limited to 'include/math-emu/op-common.h')
-rw-r--r-- | include/math-emu/op-common.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/math-emu/op-common.h b/include/math-emu/op-common.h index 93780abd01bc..bb46e7645d53 100644 --- a/include/math-emu/op-common.h +++ b/include/math-emu/op-common.h | |||
@@ -145,13 +145,16 @@ do { \ | |||
145 | { \ | 145 | { \ |
146 | X##_e = 1; \ | 146 | X##_e = 1; \ |
147 | _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ | 147 | _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ |
148 | FP_SET_EXCEPTION(FP_EX_INEXACT); \ | ||
148 | } \ | 149 | } \ |
149 | else \ | 150 | else \ |
150 | { \ | 151 | { \ |
151 | X##_e = 0; \ | 152 | X##_e = 0; \ |
152 | _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ | 153 | _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ |
153 | FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \ | ||
154 | } \ | 154 | } \ |
155 | if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) || \ | ||
156 | (FP_TRAPPING_EXCEPTIONS & FP_EX_UNDERFLOW)) \ | ||
157 | FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \ | ||
155 | } \ | 158 | } \ |
156 | else \ | 159 | else \ |
157 | { \ | 160 | { \ |