|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
using ARM VFP hardwareI'm sorry, I tried to find some info on the subject
in this list archives; I saw this question asked several times in different forms, but always with no final solution. We'd like to use GCC to build executables running on a ARM946E-S with a VFP9 coprocessor, bare metal (no OS). The problems come when trying to actually use VFP9. http://gcc.gnu.org/ml/gcc-help/2008-01/msg00133.html suggests that building with -mfpu=vfp -mfloat-abi=soft may produce code which will link to libgcc functions, and libgcc will use VFP instructions. Having read http://gcc.gnu.org/install/configure.html, I install binutils-2.19.1 targeting arm-unknown-elf into $HOME/arm, export PATH=$HOME/arm/bin:$PATH, mkdir build and run ../gcc-4.4.1/configure --prefix=$HOME/arm \ --target=arm-unknown-elf --enable-interwork \ --disable-nls --with-mpfr=$HOME/mpfr \ --disable-libssp --enable-languages=c \ --with-fpu=vfp --with-cpu=arm946e-s --with-float=soft \ && make && make install After that I compile a test: int main(int argc,char**argv) {double x=argc*.17,y=argc*2-.1; return(int)(x/y+y*x); } arm-unknown-elf-gcc -Wall -O0 -nostdlib \ -mfpu=vfp -mfloat-abi=soft -o e e.c -lgcc Then I look for instructions whose name begins with f (according to VFP9 documentation, every coprocessor instruction mnemonic begins with that letter): arm-unknown-elf-objdump -d e| \ egrep ":[[:space:]]+[[:xdigit:]]+[[:space:]]+[Ff]" It shows no lines, the same as arm-unknown-elf-objdump -d \ $HOME/arm/lib/gcc/arm-unknown-elf/4.4.1/libgcc.a| \ egrep ":[[:space:]]+[[:xdigit:]]+[[:space:]]+[Ff]" It seems to me that it just inserts floating point emulation routines. GCC sources (in particular, gcc/config/arm/vfp.md) make me think that there must be more hardware VFP support than I managed to switch on. Does anybody know how to do this? Thanks, |
|
|
Re: using ARM VFP hardwareIneiev <ineiev@...> writes:
> After that I compile a test: > int > main(int argc,char**argv) > {double x=argc*.17,y=argc*2-.1; > return(int)(x/y+y*x); > } > > arm-unknown-elf-gcc -Wall -O0 -nostdlib \ > -mfpu=vfp -mfloat-abi=soft -o e e.c -lgcc > > Then I look for instructions whose name begins with f Using -mfloat=abi=soft directs gcc to call floating point emulation routines. Have you tried -mfloat-abi=softfp or -mfloat-abi=hard? > ../gcc-4.4.1/configure --prefix=$HOME/arm \ > --target=arm-unknown-elf --enable-interwork \ > --disable-nls --with-mpfr=$HOME/mpfr \ > --disable-libssp --enable-languages=c \ > --with-fpu=vfp --with-cpu=arm946e-s --with-float=soft \ Using --with-float=soft makes soft floating point the default. If you don't want soft floating point, what led you to use --with-float=soft? Ian |
|
|
Re: using ARM VFP hardwareOn Mon, 2009-11-09 at 09:31 -0800, Ian Lance Taylor wrote: > Ineiev <ineiev@...> writes: > > > After that I compile a test: > > int > > main(int argc,char**argv) > > {double x=argc*.17,y=argc*2-.1; > > return(int)(x/y+y*x); > > } > > > > arm-unknown-elf-gcc -Wall -O0 -nostdlib \ > > -mfpu=vfp -mfloat-abi=soft -o e e.c -lgcc > > > > Then I look for instructions whose name begins with f > > Using -mfloat=abi=soft directs gcc to call floating point emulation > routines. Have you tried -mfloat-abi=softfp or -mfloat-abi=hard? > > > ../gcc-4.4.1/configure --prefix=$HOME/arm \ > > --target=arm-unknown-elf --enable-interwork \ > > --disable-nls --with-mpfr=$HOME/mpfr \ > > --disable-libssp --enable-languages=c \ > > --with-fpu=vfp --with-cpu=arm946e-s --with-float=soft \ > > Using --with-float=soft makes soft floating point the default. If you > don't want soft floating point, what led you to use --with-float=soft? > > Ian -mfloat-abi=hard will only work with gcc-4.5 (ie trunk) R. |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |