aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog5
-rw-r--r--libgcc/config/arm/fp16.c8
2 files changed, 8 insertions, 5 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 95b95b1..df3dfee 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-13 John Tytgat <John@bass-software.com>
+
+ * config/arm/fp16.c (__gnu_f2h_internal): Fix inaccuracy when aexp
+ is 25.
+
2012-12-12 Jakub Jelinek <jakub@redhat.com>
PR libgcc/55451
diff --git a/libgcc/config/arm/fp16.c b/libgcc/config/arm/fp16.c
index 936caeb..786830f 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;