From 002f0b0b5df92cc1c1302c6b95c0c97fd986ed94 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 3 May 2007 12:15:04 +0000 Subject: * math/test-misc.c (main): Add tests for rounding long double values close to smallest double denormalized value to double. * soft-fp/op-common.h (FP_TRUNC): Correct off-by-one error in condition for truncating to 0. Set sticky bit for such truncation. 2007-05-03 Jakub Jelinek * math/test-misc.c (main): Add tests for rounding long double values close to smallest double denormalized value to double. 2007-04-30 Joseph Myers * soft-fp/op-common.h (FP_TRUNC): Correct off-by-one error in condition for truncating to 0. Set sticky bit for such truncation. --- soft-fp/op-common.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'soft-fp') diff --git a/soft-fp/op-common.h b/soft-fp/op-common.h index 0aa6e3e..1f58b89 100644 --- a/soft-fp/op-common.h +++ b/soft-fp/op-common.h @@ -1211,8 +1211,11 @@ do { \ { \ if (D##_e <= 0) \ { \ - if (D##_e <= 1 - _FP_FRACBITS_##dfs) \ - _FP_FRAC_SET_##swc(S, _FP_ZEROFRAC_##swc); \ + if (D##_e < 1 - _FP_FRACBITS_##dfs) \ + { \ + _FP_FRAC_SET_##swc(S, _FP_ZEROFRAC_##swc); \ + _FP_FRAC_LOW_##swc(S) |= 1; \ + } \ else \ { \ _FP_FRAC_HIGH_##sfs(S) |= _FP_IMPLBIT_SH_##sfs; \ -- cgit v1.1