diff options
author | John Tytgat <John@bass-software.com> | 2012-12-13 12:05:30 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2012-12-13 12:05:30 +0000 |
commit | 65f141179f4af86da654e1a0787c58f7ecf60c72 (patch) | |
tree | 4bfc026f2e849ce992ec69513cc07d54a2adba38 /libgcc/config | |
parent | 3ecce8a1ff83d1462ced908c44c8179aee4c2852 (diff) | |
download | gcc-65f141179f4af86da654e1a0787c58f7ecf60c72.tar.gz |
fp16.c (__gnu_f2h_internal): Fix inaccuracy when aexp is 25.
* config/arm/fp16.c (__gnu_f2h_internal): Fix inaccuracy when aexp
is 25.
From-SVN: r194474
Diffstat (limited to 'libgcc/config')
-rw-r--r-- | libgcc/config/arm/fp16.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libgcc/config/arm/fp16.c b/libgcc/config/arm/fp16.c index 936caeb78d0..786830f2ec6 100644 --- a/libgcc/config/arm/fp16.c +++ b/libgcc/config/arm/fp16.c @@ -47,11 +47,9 @@ __gnu_f2h_internal(unsigned int a, int ieee) mantissa |= 0x00800000; if (aexp < -14) { - mask = 0x007fffff; - if (aexp < -25) - aexp = -26; - else if (aexp != -25) - mask >>= 24 + aexp; + mask = 0x00ffffff; + if (aexp >= -25) + mask >>= 25 + aexp; } else mask = 0x00001fff; |