Created
June 2, 2017 04:48
-
-
Save samrat/70381c9cee58d1f981d72337c1848038 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
function w $foo(w %x) { | |
@start | |
jnz %x, @cond, @end | |
@cond | |
%B0 =l alloc4 8 | |
%B1 =l add %B0, 4 | |
storew 12, %B0 | |
storew 111, %B1 | |
%v5 =w add 1, %x | |
ret %B0 | |
@end | |
ret 12 | |
} |
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
.text | |
foo: | |
pushq %rbp | |
movq %rsp, %rbp | |
cmpl $0, %edi | |
jnz .Lbb2 | |
movl $12, %eax | |
leave | |
ret | |
.Lbb2: | |
subq $16, %rsp | |
movq %rsp, %rax | |
movl $12, (%rax) | |
movl $111, 4(%rax) | |
leave | |
ret | |
/* end function foo */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment