Created
April 20, 2011 11:03
-
-
Save itisravi/931001 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.arch armv7-a | |
.eabi_attribute 27, 3 | |
.fpu neon | |
.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 18, 2 | |
.file "neon.c" | |
.section .rodata | |
.align 2 | |
.LC0: | |
.ascii "Time for compute : %d microseconds\012\000" | |
.text | |
.align 2 | |
.global main | |
.type main, %function | |
main: | |
.fnstart | |
.LFB1870: | |
@ args = 0, pretend = 0, frame = 16024 | |
@ frame_needed = 1, uses_anonymous_args = 0 | |
stmfd sp!, {fp, lr} | |
.save {fp, lr} | |
.setfp fp, sp, #4 | |
add fp, sp, #4 | |
.pad #16000 | |
sub sp, sp, #16000 | |
.pad #24 | |
sub sp, sp, #24 | |
sub r3, fp, #16000 | |
sub r3, r3, #4 | |
sub r3, r3, #24 | |
str r3, [fp, #-8] | |
mov r3, #0 | |
str r3, [fp, #-12] | |
b .L2 | |
.L3: | |
ldr r1, [fp, #-12] | |
ldr r3, [fp, #-12] | |
add r2, r3, #1 | |
movw r3, #:lower16:-16024 | |
movt r3, #:upper16:-16024 | |
mov r1, r1, asl #2 | |
sub r0, fp, #4 | |
add r1, r1, r0 | |
add r3, r1, r3 | |
str r2, [r3, #0] | |
ldr r3, [fp, #-12] | |
add r3, r3, #1 | |
str r3, [fp, #-12] | |
.L2: | |
ldr r2, [fp, #-12] | |
movw r3, #3999 | |
cmp r2, r3 | |
bls .L3 | |
sub r3, fp, #20 | |
mov r0, r3 | |
mov r1, #0 | |
bl gettimeofday | |
sub r3, fp, #16000 | |
sub r3, r3, #4 | |
sub r3, r3, #24 | |
mov r0, r3 | |
mov r1, #4000 | |
bl double_elements | |
sub r3, fp, #28 | |
mov r0, r3 | |
mov r1, #0 | |
bl gettimeofday | |
mov r0, #10 | |
bl putchar | |
movw r3, #:lower16:.LC0 | |
movt r3, #:upper16:.LC0 | |
ldr r1, [fp, #-24] | |
ldr r2, [fp, #-16] | |
rsb r1, r2, r1 | |
ldr r0, [fp, #-28] | |
ldr r2, [fp, #-20] | |
rsb r0, r2, r0 | |
movw r2, #:lower16:1000000 | |
movt r2, #:upper16:1000000 | |
mul r2, r2, r0 | |
add r2, r1, r2 | |
mov r0, r3 | |
mov r1, r2 | |
bl printf | |
mov r3, #0 | |
mov r0, r3 | |
sub sp, fp, #4 | |
ldmfd sp!, {fp, pc} | |
.fnend | |
.size main, .-main | |
.align 2 | |
.global double_elements | |
.type double_elements, %function | |
double_elements: | |
.fnstart | |
.LFB1871: | |
@ args = 0, pretend = 0, frame = 96 | |
@ frame_needed = 1, uses_anonymous_args = 0 | |
@ link register save eliminated. | |
str fp, [sp, #-4]! | |
.save {fp} | |
.setfp fp, sp, #0 | |
add fp, sp, #0 | |
.pad #100 | |
sub sp, sp, #100 | |
str r0, [fp, #-96] | |
str r1, [fp, #-100] | |
mov r3, #0 | |
str r3, [fp, #-88] | |
b .L6 | |
.L7: | |
ldr r3, [fp, #-96] | |
str r3, [fp, #-52] | |
ldr r3, [fp, #-52] | |
vld1.32 {d16-d17}, [r3] | |
vstr d16, [fp, #-84] | |
vstr d17, [fp, #-76] | |
vldr d16, [fp, #-84] | |
vldr d17, [fp, #-76] | |
vstr d16, [fp, #-44] | |
vstr d17, [fp, #-36] | |
vldr d16, [fp, #-44] | |
vldr d17, [fp, #-36] | |
vshl.i32 q8, q8, #1 | |
vstr d16, [fp, #-68] | |
vstr d17, [fp, #-60] | |
ldr r3, [fp, #-96] | |
str r3, [fp, #-8] | |
vldr d16, [fp, #-68] | |
vldr d17, [fp, #-60] | |
vstr d16, [fp, #-28] | |
vstr d17, [fp, #-20] | |
ldr r3, [fp, #-8] | |
vldr d16, [fp, #-28] | |
vldr d17, [fp, #-20] | |
vst1.32 {d16-d17}, [r3] | |
ldr r3, [fp, #-96] | |
add r3, r3, #16 | |
str r3, [fp, #-96] | |
ldr r3, [fp, #-88] | |
add r3, r3, #1 | |
str r3, [fp, #-88] | |
.L6: | |
ldr r3, [fp, #-100] | |
mov r2, r3, lsr #2 | |
ldr r3, [fp, #-88] | |
cmp r2, r3 | |
bhi .L7 | |
add sp, fp, #0 | |
ldmfd sp!, {fp} | |
bx lr | |
.fnend | |
.size double_elements, .-double_elements | |
.ident "GCC: (Linux release 2010-06-30) 4.4.1" | |
.section .note.GNU-stack,"",%progbits |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
arm-v7a8-linux-gnueabi-gcc -S -mfpu=neon neon.c