Patchwork [libgcc,ARM] __gnu_f2h_internal inaccuracy

login
register
mail settings
Submitter John Tytgat
Date Nov. 27, 2012, 12:46 a.m.
Message ID <0aa9eef452.Jo@hobbes.bass-software.com>
Download mbox | patch
Permalink /patch/202056/
State New
Headers show

Comments

John Tytgat - Nov. 27, 2012, 12:46 a.m.
In message <ab11eef452.Jo@hobbes.bass-software.com>
          John Tytgat <john@bass-software.com> wrote:

> [...] Attached patch solves this problem. [...]

This time for real.

John Tytgat.

Patch

Index: libgcc/config/arm/fp16.c
===================================================================
--- libgcc/config/arm/fp16.c	(revision 193830)
+++ libgcc/config/arm/fp16.c	(working copy)
@@ -47,11 +47,9 @@ 
   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;