2016-04-09 02:15:37 +08:00
|
|
|
# RUN: llvm-objdump -m -d %p/Inputs/hello.obj.macho-x86_64 -no-show-raw-insn -print-imm-hex -no-leading-addr | FileCheck %s
|
2015-03-18 05:07:39 +08:00
|
|
|
|
|
|
|
# CHECK: (__TEXT,__text) section
|
|
|
|
# CHECK: _main:
|
|
|
|
# CHECK: pushq %rbp
|
|
|
|
# CHECK: movq %rsp, %rbp
|
|
|
|
# CHECK: subq $0x20, %rsp
|
|
|
|
# CHECK: leaq L_.str(%rip), %rax ## literal pool for: "Hello world\n"
|
|
|
|
# CHECK: movl $_main, -0x4(%rbp)
|
|
|
|
# CHECK: movl %edi, -0x8(%rbp)
|
|
|
|
# CHECK: movq %rsi, -0x10(%rbp)
|
|
|
|
# CHECK: movq %rdx, -0x18(%rbp)
|
|
|
|
# CHECK: movq %rax, %rdi
|
|
|
|
# CHECK: movb $0x0, %al
|
|
|
|
# CHECK: callq _printf
|
|
|
|
# CHECK: movl $_main, %ecx
|
|
|
|
# CHECK: movl %eax, -0x1c(%rbp)
|
|
|
|
# CHECK: movl %ecx, %eax
|
|
|
|
# CHECK: addq $0x20, %rsp
|
|
|
|
# CHECK: popq %rbp
|
|
|
|
# CHECK: retq
|
|
|
|
|
|
|
|
# CHECK-NOT: 0:
|
|
|
|
# CHECK-NOT: 0000000000000000
|