Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / ELF / cfi-adjust-cfa-offset.s
blob1ea60b10e2e581d3fc240936b3cbfbe3c2a5297a
1 # RUN: llvm-mc -triple x86_64 %s | FileCheck %s --check-prefix=ASM
2 # RUN: llvm-mc -filetype=obj -triple x86_64 %s | llvm-readobj -S --sr --sd - | FileCheck %s
4 # ASM: .cfi_def_cfa_offset 16{{$}}
5 # ASM-NEXT: nop
7 f:
8 .cfi_startproc
9 subq $8, %rsp
10 .cfi_def_cfa_offset 16
11 nop
12 .cfi_adjust_cfa_offset 4
13 addq $8, %rsp
14 .cfi_def_cfa_offset 8
15 ret
16 .cfi_endproc
18 .cfi_startproc
19 nop
20 .cfi_adjust_cfa_offset 4
21 .cfi_endproc
23 .cfi_startproc
24 nop
25 .cfi_adjust_cfa_offset 4
26 .cfi_endproc
28 // CHECK: Section {
29 // CHECK: Index:
30 // CHECK: Name: .eh_frame
31 // CHECK-NEXT: Type: SHT_X86_64_UNWIND
32 // CHECK-NEXT: Flags [
33 // CHECK-NEXT: SHF_ALLOC
34 // CHECK-NEXT: ]
35 // CHECK-NEXT: Address: 0x0
36 // CHECK-NEXT: Offset: 0x50
37 // CHECK-NEXT: Size: 96
38 // CHECK-NEXT: Link: 0
39 // CHECK-NEXT: Info: 0
40 // CHECK-NEXT: AddressAlignment: 8
41 // CHECK-NEXT: EntrySize: 0
42 // CHECK-NEXT: Relocations [
43 // CHECK-NEXT: ]
44 // CHECK-NEXT: SectionData (
45 // CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
46 // CHECK-NEXT: 0010: 1B0C0708 90010000 18000000 1C000000
47 // CHECK-NEXT: 0020: 00000000 0A000000 00440E10 410E1444
48 // CHECK-NEXT: 0030: 0E080000 10000000 38000000 00000000
49 // CHECK-NEXT: 0040: 01000000 00410E0C 14000000 4C000000
50 // CHECK-NEXT: 0050: 00000000 01000000 00410E0C 00000000
51 // CHECK-NEXT: )
52 // CHECK-NEXT: }
53 // CHECK-NEXT: Section {
54 // CHECK-NEXT: Index:
55 // CHECK-NEXT: Name: .rela.eh_frame
56 // CHECK-NEXT: Type: SHT_RELA
57 // CHECK-NEXT: Flags [
58 // CHECK-NEXT: SHF_INFO_LINK
59 // CHECK-NEXT: ]
60 // CHECK-NEXT: Address: 0x0
61 // CHECK-NEXT: Offset:
62 // CHECK-NEXT: Size: 72
63 // CHECK-NEXT: Link:
64 // CHECK-NEXT: Info:
65 // CHECK-NEXT: AddressAlignment: 8
66 // CHECK-NEXT: EntrySize: 24
67 // CHECK-NEXT: Relocations [
68 // CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
69 // CHECK-NEXT: 0x3C R_X86_64_PC32 .text 0x
70 // CHECK-NEXT: 0x50 R_X86_64_PC32 .text 0x
71 // CHECK-NEXT: ]
72 // CHECK: }