blob: 97c1f45b03ad5c9b738aa7104833f725bf410d1b [file] [log] [blame]
// RUN: yaml2obj -o %t.out %p/Inputs/simple-executable-x86_64.yaml
// RUN: llvm-objdump -d %t.out --start-address=0x18 --stop-address=0x2f | FileCheck %s
// RUN: llvm-objdump -d %t.out --start-address=0xc --stop-address=0x11 | FileCheck %s --check-prefix "CROSSSECTION"
// RUN: llvm-objdump -d %t.out --start-address=0x40 --stop-address=0x47 | FileCheck %s --check-prefix "CROSSDATA"
// CHECK: Disassembly of section .anothertext:
// CHECK-NEXT: main:
// CHECK-NEXT: 18: 48 8d 04 25 a8 00 00 00 leaq 168, %rax
// CHECK-NEXT: 20: c7 45 fc 00 00 00 00 movl $0, -4(%rbp)
// CHECK-NEXT: 27: 48 89 45 f0 movq %rax, -16(%rbp)
// CHECK-NEXT: 2b: 48 8b 45 f0 movq -16(%rbp), %rax
// CHECK-NOT: 2f:
// CROSSSECTION: Disassembly of section .text:
// CROSSSECTION-NEXT: foo:
// CROSSSECTION-NEXT: c: c3 retq
// CROSSSECTION-NEXT: d: 0f 1f 00 nopl (%rax)
// CROSSSECTION-NEXT: Disassembly of section .anothertext:
// CROSSSECTION-NEXT: main:
// CROSSSECTION-NEXT: 10: 55 pushq %rbp
// CROSSSECTION-NOT: 11:
// CROSSDATA: Disassembly of section .anothertext:
// CROSSDATA: main:
// CROSSDATA: 40: 48 83 c4 20 addq $32, %rsp
// CROSSDATA: 44: 5d popq %rbp
// CROSSDATA-DAG: somedata:
// CROSSDATA-NEXT: 45: 74 65 te