On 9 October 2012 14:44, Jubi Taneja <jubitan...@gmail.com> wrote: > > > On Tue, Oct 9, 2012 at 5:21 PM, Matthew Gretton-Dann > <matthew.gretton-d...@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?). When I compile the test case above with a recent (within last month or so) trunk GCC I get the following output which uses vfma: $ /work/builds/gcc-fsf-arm-none-linux-gnueabi/tools/bin/arm-none-linux-gnueabi-gcc -mcpu=cortex-a15 -mfpu=vfpv4 -S -o- /tmp/fma.c -mfloat-abi=hard -O2 .cpu cortex-a15 .eabi_attribute 27, 3 .eabi_attribute 28, 1 .fpu vfpv4 .eabi_attribute 20, 1 .eabi_attribute 21, 1 .eabi_attribute 23, 3 .eabi_attribute 24, 1 .eabi_attribute 25, 1 .eabi_attribute 26, 2 .eabi_attribute 30, 2 .eabi_attribute 34, 1 .eabi_attribute 18, 4 .file "fma.c" .text .align 2 .global f .type f, %function f: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. vfma.f32 s2, s0, s1 fcpys s0, s2 bx lr .size f, .-f .ident "GCC: (GNU) 4.8.0 20120913 (experimental)" .section .note.GNU-stack,"",%progbits -- Matthew Gretton-Dann Linaro Toolchain Working Group matthew.gretton-d...@linaro.org _______________________________________________ linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain