I want to generate neon instruction for ARM from a simple linpack.c program available from Roy I have used multiple flags with arm-linux-gnueabi-gcc such as,
arm-linux-gnueabi-gcc -S -mfpu=neon /home/junaid/code/c/linpack.c
As far as I know, the neon and VFP instruction start with a V such as VADD. But I can not seen any such instruction is the dump. I have also used -mfpu=vfp, -funsafe-math-optimizations and static (-s) flags but still I cant see any neon instruction. Either I am not recognizing the neon instructions, or not using proper gcc flags, or not explicitly using a c code that generates neon instructions!!
EDIT: Compiling the code mentioned in the first comment with the command,
arm-linux-gnueabi-gcc -S -mfpu-neon /home/junaid/code/c/test.c .
The asm is
.arch armv5t
.fpu softvfp
.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, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "test.c"
.global __aeabi_fadd
.text
.align 2
.global f
.type f, %function
f:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {fp, lr}
add fp, sp, #4
sub sp, sp, #8
str r0, [fp, #-8] @ float
ldr r3, [fp, #-8] @ float
mov r0, r3
mov r1, r3
bl __aeabi_fadd
mov r3, r0
mov r0, r3
sub sp, fp, #4
ldmfd sp!, {fp, pc}
.size f, .-f
.ident "GCC: (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3"
.section .note.GNU-stack,"",%progbits
float f(float x){return 2*x;}
) and showing us the asm? – Marc Glisse-mfloat-abi=hard -mfpu=neon
? – Marc Glisse-O3
). – Ross Ridge