[email protected]
[Top] [All Lists]

Re: toolchain/43303: __builtin_huge_val() generates illegal code on vax

Subject: Re: toolchain/43303: __builtin_huge_val() generates illegal code on vax
From: "Michael L. Hitch"
Date: Sat, 15 May 2010 19:15:04 +0000 UTC
The following reply was made to PR toolchain/43303; it has been noted by GNATS.

From: "Michael L. Hitch" <[email protected]>
To: [email protected]
Cc: 
Subject: Re: toolchain/43303: __builtin_huge_val() generates illegal code on
 vax
Date: Sat, 15 May 2010 13:10:36 -0600 (MDT)

 On Thu, 13 May 2010, [email protected] wrote:
 
 > causes a SIGILL when run, the asm code that fails is:
 >
 >      movd $0d+Inf,-12(%fp)
 ...
 >> Fix:
 > fix gcc's idea of __builtin_huge_val() for vax
 
    Hmmm...  It looks to me like atof_vax.c is missing the support for
 Nan, +Inf, and -Inf.  There's a comment at line 271 of 
 src/external/gpl3/binutils/dist/gas/config/atof-vax.c:
 
            /* JF: Deal with new Nan, +Inf and -Inf codes.  */
 
    But it only checks for '+' and '-' in f->sign;  f->sign will contain 0 
 for Nan, 'P' for +Inf, and 'N' for -Inf (set by atof_generic()).  It
 then generates an invalid floating point number.
 
 --
 Michael L. Hitch                       [email protected]
 Computer Consultant
 Information Technology Center
 Montana State University       Bozeman, MT     USA
 

<Prev in Thread] Current Thread [Next in Thread>