Created
August 15, 2012 22:22
-
-
Save sumtyme/3364272 to your computer and use it in GitHub Desktop.
Just in case you were too lazy to do it:
This file contains hidden or 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
.file "test.c" | |
.text | |
.p2align 4,,15 | |
.globl swap1 | |
.type swap1, @function | |
swap1: | |
.LFB11: | |
.cfi_startproc | |
movl (%rsi), %eax | |
xorl (%rdi), %eax | |
movl %eax, (%rdi) | |
xorl (%rsi), %eax | |
movl %eax, (%rsi) | |
xorl %eax, (%rdi) | |
ret | |
.cfi_endproc | |
.LFE11: | |
.size swap1, .-swap1 | |
.p2align 4,,15 | |
.globl swap2 | |
.type swap2, @function | |
swap2: | |
.LFB12: | |
.cfi_startproc | |
movl (%rdi), %eax | |
movl (%rsi), %edx | |
movl %edx, (%rdi) | |
movl %eax, (%rsi) | |
ret | |
.cfi_endproc | |
.LFE12: | |
.size swap2, .-swap2 | |
.section .rodata.str1.1,"aMS",@progbits,1 | |
.LC0: | |
.string "%i, %i\n" | |
.text | |
.p2align 4,,15 | |
.globl main | |
.type main, @function | |
main: | |
.LFB13: | |
.cfi_startproc | |
subq $8, %rsp | |
.cfi_def_cfa_offset 16 | |
movl $5, %edx | |
movl $5, %esi | |
movl $.LC0, %edi | |
xorl %eax, %eax | |
call printf | |
xorl %edx, %edx | |
xorl %esi, %esi | |
movl $.LC0, %edi | |
xorl %eax, %eax | |
call printf | |
movl $5, %edx | |
movl $3, %esi | |
movl $.LC0, %edi | |
xorl %eax, %eax | |
call printf | |
movl $3, %edx | |
movl $5, %esi | |
movl $.LC0, %edi | |
xorl %eax, %eax | |
addq $8, %rsp | |
.cfi_def_cfa_offset 8 | |
jmp printf | |
.cfi_endproc | |
.LFE13: | |
.size main, .-main | |
.ident "GCC: (GNU) 4.4.6 20120305 (Red Hat 4.4.6-4)" | |
.section .note.GNU-stack,"",@progbits |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment