This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with crosstool 0.28-pre28 supplied patch for gcc 3.3.[23] softfloat on ARM


On 2004-08-16 at 02:00:55 Lennert Buytenhek wrote:

>         x = 1.0;
>         printf("%f\n", x);
[...]
> [root@enp2611 tmp]# ./x
> 0.000000
[...]
> If I try to print 1.1, I get "-0.000000".
> If I try to print 1.2, I get "2.000000".
> If I try to print 1.3, I get "-2.000000".
> And if I try to print 1.4, I get (hang on)
> "26815622249480124604215817416420243243587272560002206992098063765762173090970884294781200568594023450472595307446283091495952708613797907653947046282395648.000000"

> Maybe you have an idea off the top of your hat what's going wrong here?

I suppose this is what crosstool's patches/glibc-2.3.2/glibc-vfp.patch
should fix.  Are you sure it is applied correctly?  It seems that
glibc interprets the float endianness incorrectly, thus printing
garbage.

Can you try producing some .s files with your compiler, to see what it
generates for the floating point constants?

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]