This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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: gcc 4.4.0 on ARM/WinCE float problem


On Thu, 2009-07-23 at 10:07 +0100, Dave Korn wrote:
> Are you using soft or hard fp?

Soft. Not all ARM processors have hardware fp.

>   I don't think you're going to get anywhere with this until you start looking
> at the generated code to see precisely *what* is wrong with it.  You've gone
> as far as you can with prodding it from the outside like a black box.

I've gone slightly further. But I'm still, as you say, outside the black
box. See below. My ARM assembler knowledge is rusty at best though, so
going deeper is not easy.

Kai Ruottu wrote :
> Comparing the output from some earlier working GCC with the gcc-4.4.0
> output would reveal if something was wrong in preparing inputs for
> the soft-float routines... Or maybe something was changed in the
> soft-float routines... What if you try a 'libgcc.a' taken from some
> earlier working GCC ?

Did that, see below. I think this means that the stuff in libgcc.a cause
the issue.

I've further looked at the content of libgcc2.c, which reveals macros
renamed from L_* to L_arm_* (commit r132837 in gcc svn). But the
description of that change seems to imply that this is all avmv6-m
related and should not affect other processors.

pavilion: {16} make clean
rm -f *.o *.exe *.rsc *.S *.od
rm -f float
pavilion: {17} make
arm-mingw32ce-gcc -D_WIN32_WCE=0x0600 -g -o float.exe float.c 
arm-mingw32ce-objdump -xd float.exe >float.od
arm-mingw32ce-gcc -D_WIN32_WCE=0x0600 -S -o float.S float.c
/opt/oldgcc/bin/arm-mingw32ce-gcc -D_WIN32_WCE=0x0600 -g -o ofloat.exe
float.c
arm-mingw32ce-objdump -xd ofloat.exe >ofloat.od
/opt/oldgcc/bin/arm-mingw32ce-gcc -D_WIN32_WCE=0x0600 -S -o ofloat.S
float.c
rcp float.exe ipaq:/temp
rsh ipaq /temp/float.exe
Foo 34 12.000000 67
 12 * 3 -> 0.000000
 36 -> 0.000000
 36 d -> 36.000000
rcp ofloat.exe ipaq:/temp
rsh ipaq /temp/ofloat.exe
Foo 34 12.000000 67
 12 * 3 -> 36.000000
 36 -> 36.000000
 36 d -> 36.000000
/opt/oldgcc/bin/arm-mingw32ce-gcc -D_WIN32_WCE=0x0600 -o tst1.exe
float.c /opt/mingw32ce/lib/gcc/arm-mingw32ce/4.4.0/libgcc.a
arm-mingw32ce-objdump -xd tst1.exe >tst1.od
rcp tst1.exe ipaq:/temp
rsh ipaq /temp/tst1.exe
Foo 34 12.000000 67
 12 * 3 -> 12.000004
 36 -> 0.000000
 36 d -> 36.000000
arm-mingw32ce-gcc -D_WIN32_WCE=0x0600 -o tst2.exe
float.c /opt/oldgcc/lib/gcc/arm-mingw32ce/4.1.0/libgcc.a
arm-mingw32ce-objdump -xd tst2.exe >tst2.od
rcp tst2.exe ipaq:/temp
rsh ipaq /temp/tst2.exe
Foo 34 12.000000 67
 12 * 3 -> 36.000000
 36 -> 36.000000
 36 d -> 36.000000
pavilion: {18} /opt/oldgcc/bin/arm-mingw32ce-gcc -v
Using built-in specs.
Target: arm-mingw32ce
Configured
with: /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --build=i686-pc-linux-gnu --target=arm-mingw32ce --host=i686-pc-linux-gnu --prefix=/opt/oldgcc --enable-threads=win32 --disable-nls --enable-languages=c,c++ --disable-win32-registry --disable-multilib --disable-interwork --without-newlib --enable-checking --with-headers
Thread model: win32
gcc version 4.1.0
pavilion: {19} arm-mingw32ce-gcc -v
Using built-in specs.
Target: arm-mingw32ce
Configured
with: /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/gcc-4.4.0/configure --with-gcc --with-gnu-ld --with-gnu-as --build=i686-pc-linux-gnu --target=arm-mingw32ce --host=i686-pc-linux-gnu --prefix=/opt/mingw32ce --enable-threads=win32 --disable-nls --enable-languages=c,c++ --disable-win32-registry --disable-multilib --disable-interwork --without-newlib --enable-checking --with-headers --disable-__cxa_atexit
Thread model: win32
gcc version 4.4.0 (GCC) 
pavilion: {20} 

BTW I've put all of this directory up at
http://danny.backx.info/download/cegcc/test.tar.gz . (117686 bytes)

	Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


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