OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: Wood on October 09, 2004, 08:08:13 am
-
What compile option(s) must be added to make sure vector floating point library is used? I've tried using the options "-mcpu=xscale -Wa,-mfpu=softvfp", but this did not result in a performance boost.
-
interestingly
float test(float a, float b)
{
return(a*b);
}
compiles to (gcc -O3 -S float.c -o float.s)
str lr, [sp,#-4]!
bl __mulsf3
ldr pc, [sp], #4
which calls another function to do the multiply. I thought it might inline the body of the multiply, but I guess that would really bloat the code.
-
on default, gcc/g++ generate code for xscale with softvfp calls. soft VFP unit compiled inside libgcc*.so. For speed optimization i use next flags -Os -fomit-frame-pointer
inline softvfp code must be faster with bigger code size, but gcc cannot generate this. Anyway that faster than kernel FPA emulator %)
-
Now I understand how floating point emulation was done before
http://www.heyrick.co.uk/assembler/coprocmnd.html (http://www.heyrick.co.uk/assembler/coprocmnd.html)
An undefined instruction trap for a coprosessor instruction is caught by the kernel and handled there.
SLOW!
Still haven't worked out whether lib gcc has Nicolas Pitre's hand coded floating point emulation though, that is meant to be even faster. Tryed some objdumb -d action, but libgcc doesn't have any symbols.