NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

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



The following reply was made to PR toolchain/43303; it has been noted by GNATS.

From: "Michael L. Hitch" <mhitch%lightning.msu.montana.edu@localhost>
To: gnats-bugs%NetBSD.org@localhost
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, martin%NetBSD.org@localhost 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                       mhitch%montana.edu@localhost
 Computer Consultant
 Information Technology Center
 Montana State University       Bozeman, MT     USA
 


Home | Main Index | Thread Index | Old Index