hello.s 491 B

12345678910111213141516171819202122232425262728
  1. // RUN: llvm-mc -triple i386-apple-darwin9 %s -o -
  2. // RUN: llvm-mc -triple i386-apple-darwin9 %s -o - -output-asm-variant=1
  3. .text
  4. .align 4,0x90
  5. .globl _main
  6. _main:
  7. pushl %ebp
  8. movl %esp, %ebp
  9. subl $8, %esp
  10. call "L1$pb"
  11. "L1$pb":
  12. popl %eax
  13. movl $0, -4(%ebp)
  14. movl %esp, %ecx
  15. leal L_.str-"L1$pb"(%eax), %eax
  16. movl %eax, (%ecx)
  17. call _printf
  18. movl $0, -4(%ebp)
  19. movl -4(%ebp), %eax
  20. addl $8, %esp
  21. popl %ebp
  22. //ret
  23. .subsections_via_symbols
  24. .cstring
  25. L_.str:
  26. .asciz "hello world!\n"