![](https://secure.gravatar.com/avatar/16d7a944b770f44d9e751445eda6bfda.jpg?s=120&d=mm&r=g)
Hello,
From: romit dasgupta [mailto:romit@myrealbox.com] Sent: Tuesday, March 09, 2004 6:30 AM
[ about doing floating point computations on IXP1200 core ]
If you are talking about userland, then libm is your friend. If you are talking about kernel space then you may compile your kernel with CONFIG_FPE_NWFPE or CONFIG_FPE_FASTFPE.
Romit, I think you have been confused by the fact the CONFIG_FPE_NWFPE and
CONFIG_FPE_FASTFPE are kernel options. In fact, once enabled, they provide
floating point emulation for *user* application.
BTW, if you want fast floating point computations, it appears that there is
a patch floating around (no pun intended) for gcc that implements floating
point emulation at the compilation toolchain level. According to linux-arm
developers, it is much faster than kernel level emulation. However, this
patch requires to recompile all the libraries, including the glibc.
On 2004-03-08, in an email entitled "SoftFloat Benchmarks" on arm-linux
mailing list, Eric BENARD / Free [ebenard@free.fr] has posted a comparison
of the different solutions:
--- email included ---
I've run some benchs in order to compare FP solutions on an IXP425 (rev0)
running at 533 MHz with Linux 2.4.21-rmk1-ds3 (with NWFPE patches from the
arm-kernel ML).
Test softwares are : nbench v2 and flops 2.0
Test compilers are :
- gcc 3.3.3 + glibc 2.3.2 => using kernel emulation NWFPE or FFPE
- gcc 3.3.3 + Nico's patches + glibc 2.3.2
Compiler options are :
-O3 -fomit-frame-pointer -mcpu=xscale -mtune=xscale -mbig-endian
-static
Results :
*** nbench, Floating Point Index (vs P90 / vs K6/233) :
NWFPE : 0.028 / 0.015
FFPE : 0.062 / 0.031 = NWFPE * 2.2
NICO : 0.260 / 0.144 = NWFPE * 9.3
*** flops, mean of the 4 MFLOPS values returned by the test :
NWFPE : 0.52
FFPE : 1.89 = NWFPE * 3.63
NICO : 3.91 = NWFPE * 7.52
--- end of email included ---
If you want fast floating point anyway, you'd better do fix point
computations on integers.
It is not allowed by linux kernel developpers to do floating point
computations in the kernel.
Sharmila, if you want more information on floating point and arm, look at
arm-linux mailing list archive. This has been discussed numerous times.
Yours,
david
--
David Mentré