check your softfp compiler flag

For those of you using fedora on your bb
(maybe I'm the only one)
I noticed the default compiler flags use

-mfloat-abi=soft

switching to:

-mfloat-abi=softfp

speeded up my little test app by 7x

It might be worth testing on other distributions...

I thought on our hardware neon was
supposed to be faster than vfp for basic arithmetic
but not in this test.

Here's the output:

soft 2.200002 2.200001 5
ans = 9.705820 1098 loop/msec
softfp-vfp 2.200002 2.200001 5
ans = 9.705820 8260 loop/msec
softfp-neon 2.200002 2.200001 5
ans = 9.705820 7206 loop/msec
default 2.200002 2.200001 5
ans = 9.705820 1100 loop/msec

(nice that all the answers are the same :slight_smile:

Andrew,

I use Fedora 14 x86_64 on my older laptop, but not on my Beagleboard xM. For a little Christmas eve fun I tried compiling it on my laptop anyhow and got the "hard" error you seem to note in your Makefile:

[bob@deaf57 arm_compiler_flags]$ make all
cc test.c -mfloat-abi=hard -O9 -std=c99 -march=armv7-a -mfpu=neon -o hard
cc1: error: unrecognized command line option "-mfloat-abi=hard"
cc1: error: unrecognized command line option "-mfpu=neon"
test.c:1:0: error: bad value (armv7-a) for -march= switch
make: *** [hard] Error 1

i think you generally have to build them but the process
is well automated. bitbake or something...