From patchwork Tue Nov 27 00:46:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [libgcc,ARM] __gnu_f2h_internal inaccuracy Date: Mon, 26 Nov 2012 14:46:38 -0000 From: John Tytgat X-Patchwork-Id: 202056 Message-Id: <0aa9eef452.Jo@hobbes.bass-software.com> To: gcc-patches@gcc.gnu.org, ian@airs.com, nickc@redhat.com, richard.earnshaw@arm.com, paul@codesourcery.com, ramana.radhakrishnan@arm.com In message John Tytgat wrote: > [...] Attached patch solves this problem. [...] This time for real. John Tytgat. 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;