[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/22800] ARM double to ascii conversion issue
From: |
ton at sagemdenmark dot dk |
Subject: |
[Bug classpath/22800] ARM double to ascii conversion issue |
Date: |
20 Sep 2005 08:57:40 -0000 |
------- Additional Comments From ton at sagemdenmark dot dk 2005-09-20 08:57
-------
In ./native/fdlibm/mprec.h I found the following macro definition:
/* The following definition of Storeinc is appropriate for MIPS processors.
* An alternative that might be better on some machines is
* #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
*/
#if defined(IEEE_8087) + defined(VAX)
#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \
((unsigned short *)a)[0] = (unsigned short)c, a++)
#else
#define Storeinc(a,b,c) (((unsigned short *)a)[0] = (unsigned short)b, \
((unsigned short *)a)[1] = (unsigned short)c, a++)
#endif
It seems that the else branch is selected when gcc is configured like this:
Using built-in specs.
Target: arm-elf
Configured with: ../gcc-4.0.1/configure --prefix=/home/ton/eft2/installdir
--target=arm-elf --with-float=soft --enable-languages=c --enable-threads=posix
Thread model: posix
gcc version 4.0.1
When running this code:
_dtoa(-123.4567, 22, 10, &dec, &sgn, &pp, buf, 1);
printf("_dtoa: '%s' %d %d\n",buf,dec,sgn);
I get this result:
_dtoa: '234566006' 3 1
However, when I hack the StoreInc macro to use the code from the if branch, I
get:
_dtoa: '1234567' 3 1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22800
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug classpath/22800] ARM double to ascii conversion issue,
ton at sagemdenmark dot dk <=