From 2b1aead12c8ae85f8257eacc6d1d1fddbdc347ea Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 21 Oct 2008 22:19:00 -0700 Subject: [PATCH] --- yaml --- r: 117768 b: refs/heads/master c: 930cc144a043ff95e56b6888fa51c618b33f89e7 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/math-emu/op-common.h | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index db9ddce85ecc..9b8a6754359e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d41e2d7317cd55cc5135356a05c289537b0f6d70 +refs/heads/master: 930cc144a043ff95e56b6888fa51c618b33f89e7 diff --git a/trunk/include/math-emu/op-common.h b/trunk/include/math-emu/op-common.h index cc1ec396f8d6..bc50aa0d6d73 100644 --- a/trunk/include/math-emu/op-common.h +++ b/trunk/include/math-emu/op-common.h @@ -139,18 +139,27 @@ do { \ if (X##_e <= _FP_WFRACBITS_##fs) \ { \ _FP_FRAC_SRS_##wc(X, X##_e, _FP_WFRACBITS_##fs); \ - _FP_ROUND(wc, X); \ if (_FP_FRAC_HIGH_##fs(X) \ & (_FP_OVERFLOW_##fs >> 1)) \ { \ X##_e = 1; \ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ - FP_SET_EXCEPTION(FP_EX_INEXACT); \ } \ else \ { \ - X##_e = 0; \ - _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ + _FP_ROUND(wc, X); \ + if (_FP_FRAC_HIGH_##fs(X) \ + & (_FP_OVERFLOW_##fs >> 1)) \ + { \ + X##_e = 1; \ + _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ + FP_SET_EXCEPTION(FP_EX_INEXACT); \ + } \ + else \ + { \ + X##_e = 0; \ + _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ + } \ } \ if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) || \ (FP_TRAPPING_EXCEPTIONS & FP_EX_UNDERFLOW)) \