Created
March 2, 2015 07:48
-
-
Save fbukevin/496c874a3b1533edc8ee 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
main: | |
@ args = 0, pretend = 0, frame = 16 | |
@ frame_needed = 1, uses_anonymous_args = 0 | |
push {r7, lr} | |
sub sp, sp, #16 | |
add r7, sp, #0 | |
movs r3, #10 | |
str r3, [r7, #4] | |
movs r3, #12 | |
str r3, [r7, #8] | |
ldr r0, [r7, #4] | |
ldr r1, [r7, #8] | |
bl add | |
str r0, [r7, #12] | |
ldr r3, [r7, #12] | |
mov r0, r3 | |
adds r7, r7, #16 | |
mov sp, r7 | |
@ sp needed | |
pop {r7, pc} | |
.size main, .-main | |
.align 2 | |
.global add | |
.thumb | |
.thumb_func | |
.type add, %function | |
add: | |
@ args = 0, pretend = 0, frame = 8 | |
@ frame_needed = 1, uses_anonymous_args = 0 | |
@ link register save eliminated. | |
push {r7} | |
sub sp, sp, #12 | |
add r7, sp, #0 | |
str r0, [r7, #4] | |
str r1, [r7] | |
ldr r2, [r7, #4] | |
ldr r3, [r7] | |
add r3, r3, r2 | |
mov r0, r3 | |
adds r7, r7, #12 | |
mov sp, r7 | |
@ sp needed | |
ldr r7, [sp], #4 | |
bx lr | |
.size add, .-add | |
.ident "GCC: (Ubuntu/Linaro 4.8.2-16ubuntu4) 4.8.2" | |
.section .note.GNU-stack,"",%progbits |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment