Guest User

Untitled

a guest
Jul 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. .file "test.bc"
  2. .text
  3. .globl factorial
  4. .align 16, 0x90
  5. .type factorial,@function
  6. factorial: # @factorial
  7. .cfi_startproc
  8. # BB#0:
  9. mov EAX, 1
  10. test EDI, EDI
  11. je .LBB0_2
  12. .align 16, 0x90
  13. .LBB0_1: # %tailrecurse
  14. # =>This Inner Loop Header: Depth=1
  15. imul EAX, EDI
  16. dec EDI
  17. jne .LBB0_1
  18. .LBB0_2: # %tailrecurse._crit_edge
  19. ret
  20. .Ltmp0:
  21. .size factorial, .Ltmp0-factorial
  22. .cfi_endproc
  23.  
  24. .globl main
  25. .align 16, 0x90
  26. .type main,@function
  27. main: # @main
  28. .cfi_startproc
  29. # BB#0:
  30. push RAX
  31. .Ltmp2:
  32. .cfi_def_cfa_offset 16
  33. mov EDI, str
  34. call puts
  35. xor EAX, EAX
  36. pop RDX
  37. ret
  38. .Ltmp3:
  39. .size main, .Ltmp3-main
  40. .cfi_endproc
  41.  
  42. .type str,@object # @str
  43. .section .rodata,"a",@progbits
  44. str:
  45. .asciz "asdf"
  46. .size str, 5
  47.  
  48.  
  49. .section ".note.GNU-stack","",@progbits
Add Comment
Please, Sign In to add comment