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]

Soft floating point emulation problems



Hello,
Just to introduce the problem, here is a summary of what I have done.
I work on an Linux port on an ARM based hardware without hw floating point support with the GNU toolchain.
I *finally* managed to compile the glibc 2.2.4 for an arm-linux configuration for 2.2.4 Kernel on a Linux host (2.2.14-5.0smp). I used binutils 2.11.2 and gcc 2.95.3.
The parameters I have used for configuration were the following:
configure \
        arm-linux \
        --build=i686-linux \
        --prefix=$PREFIX/arm-linux \
        --program-prefix=$PROGRAMDIR \
        --enable-add-ons \
        --enable-kernel=2.4.2 \
        --with-headers=$KERNELINCLUDES \
        --without-fp \
         -v 2>&1 | tee configure.out

I first generated a glibc (just typing make, with the default Makefiles).
First problem, it seems that the --without-fp has not the expected effects, has the generated libraries contained a lot of floating point instructions (it can be checked by typing arm-linux-objdump -d)...

Then, I tried to pass explicitly -msoft-float to gcc as an argument, to ensure that no fp instruction is used in the code generation. So I finally edited the Makeconfig file to change the default arguments given to gcc (adding -msoft-float). I finally
managed to build the glibc (this noon).
Even if the process dramatically reduced the number of floating points instructions, there are still a few ones...where they should not be (AFAIK)!!!
For example, in the library libm.a, there are 3 stf instructions.

arm-linux/lib/libm.a
 290:   adad51ec        stfges  f5, [sp, #944]!
 308:   bd241146        stflts  f1, [r4, -#280]!
 470:   bd241146        stflts  f1, [r4, -#280]!

I am quite confused !
I am wondering if I should have had generated gcc itsel with some kind of -msoft-float option (it was generated with -nfp in the configuration script).
Maybe is it a gcc configuration bug ?
Has anyone information about this problem ?
Does anyone know where could I find a set of floating-point instructions library ?

Thanks and regards,

Cyril Germond
Competence Center Platforms
PHILIPS Semiconductors Sophia
505, route des Lucioles
Sophia Antipolis - 06560 Valbonne - France
Tel +33 (0)4 92 96 83 63
Fax +33 (0)4 92 96 12 66
E-mail : cyril.germond@philips.com



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