On 20 October 2012 09:41, Jubi Taneja jubitaneja@gmail.com wrote:
Hi Mathew
On Tue, Oct 9, 2012 at 11:37 PM, Matthew Gretton-Dann matthew.gretton-dann@linaro.org wrote:
On 9 October 2012 14:44, Jubi Taneja jubitaneja@gmail.com wrote:
On Tue, Oct 9, 2012 at 5:21 PM, Matthew Gretton-Dann matthew.gretton-dann@linaro.org wrote:
/* arm-none-linux-gnueabi-gcc -mcpu=cortex-a15 -mfpu=vfpv4 -S -o- /tmp/fma.c -mfloat-abi=hard -O2 */ float f(float a, float b, float c) { return a * b + c; } /* end of tmp.c */
(Note that -mfloat-abi=softfp will also work in this example. Which one you want to use depends on whether you have configured your system for hard or soft-float ABIs).
I checked both with -mfpu=vfpv3 and -mfpu=vfpv4 and it generates the same assembly code. VMLA insn is emitted for both the cases. I was wondering if I can get any test case so that I may observe the difference in the two objdumps.
Which compiler are you using? VFMA support is only in trunk FSF GCC. Linaro has not yet backported support to 4.7.
I am using FSF GCC only.
What version of GCC (what does arm-none-linux-gneabi-gcc -v report?).
# arm-none-linux-gneabi-gcc -v Using built-in specs. COLLECT_GCC=arm-none-linux-gneabi-gcc COLLECT_LTO_WRAPPER=/opt/toolchains/arm/bin/../libexec/gcc/arm-none-linux-gneabi/4.6.3/lto-wrapper Target: arm-none-linux-gneabi Configured with: /home/user/arm-src/build/sources/gcc_1/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gneabi --prefix=/opt/arm --with-sysroot=/opt/arm/arm-none-linux-gneabi/sys-root --disable-libmudflap --disable-libssp --disable-libgomp --disable-nls --disable-libstdcxx-pch --with-interwork --with-mode=arm --with-fpu=vfp3 --with-cpu=cortex-a9 --with-tune=cortex-a9 --with-float=softfp --enable-extra-vd-multilibs --enable-poison-system-directories --enable-long-long --enable-threads --enable-languages=c,c++ --enable-shared --enable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion=arm-toolchain.v1 --with-gnu-as --with-gnu-ld --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-build-time-tools=/opt/arm/bin --with-gmp=/opt/arm --with-mpfr=/opt/arm --with-ppl=/opt/arm --with-cloog=/opt/arm --with-libelf=/opt/arm Thread model: posix gcc version 4.6.3 (arm-toolchain.v1)
This is gcc 4.6.3 not current trunk (which would report gcc version 4.8.0).
GCC 4.6.3 does not support VFMA.
Thanks,
Matt