Advertisement
Guest User

gcc -S -Wall -O0 test.c

a guest
Jan 11th, 2012
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. .file "test.c"
  2. .text
  3. .globl test
  4. .type test, @function
  5. test:
  6. pushl %ebp
  7. movl %esp, %ebp
  8. subl $16, %esp
  9. movl $0, -8(%ebp)
  10. movl $0, -4(%ebp)
  11. notl -8(%ebp)
  12. notl -4(%ebp)
  13. movl 8(%ebp), %ecx
  14. movl -8(%ebp), %eax
  15. movl -4(%ebp), %edx
  16. shldl %eax, %edx
  17. sall %cl, %eax
  18. testb $32, %cl
  19. je .L3
  20. movl %eax, %edx
  21. xorl %eax, %eax
  22. .L3:
  23. movl %eax, -8(%ebp)
  24. movl %edx, -4(%ebp)
  25. movl -8(%ebp), %eax
  26. leave
  27. ret
  28. .size test, .-test
  29. .section .rodata
  30. .LC0:
  31. .string "%d"
  32. .LC1:
  33. .string "%ul\n"
  34. .text
  35. .globl main
  36. .type main, @function
  37. main:
  38. pushl %ebp
  39. movl %esp, %ebp
  40. andl $-16, %esp
  41. subl $32, %esp
  42. movl $.LC0, %edx
  43. movl 12(%ebp), %eax
  44. addl $4, %eax
  45. movl (%eax), %eax
  46. leal 28(%esp), %ecx
  47. movl %ecx, 8(%esp)
  48. movl %edx, 4(%esp)
  49. movl %eax, (%esp)
  50. call __isoc99_sscanf
  51. movl 28(%esp), %eax
  52. movl %eax, (%esp)
  53. call test
  54. movl $.LC1, %edx
  55. movl %eax, 4(%esp)
  56. movl %edx, (%esp)
  57. call printf
  58. movl $0, %eax
  59. leave
  60. ret
  61. .size main, .-main
  62. .ident "GCC: (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5"
  63. .section .note.GNU-stack,"",@progbits
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement