[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / MC / AArch64 / cfi_val_offset.s
blobe345030c661d6fdc7ca5371538c4d7ed97da71e9
1 // RUN: llvm-mc -triple aarch64-- -o - %s | FileCheck %s
2 // RUN: llvm-mc -triple aarch64-- -filetype=obj -o - %s | llvm-dwarfdump --debug-frame - | FileCheck --check-prefix=DWARF %s
4 // This test just confirms the .cfi_val_offset directive emits a val_offset()
5 // rule. It's not testing anything AArch64 specific, it just needs a targets
6 // registers to be able to use the directive.
7 example:
8 // CHECK: .cfi_startproc
9 .cfi_startproc
10 add wsp, wsp, 16
11 .cfi_def_cfa wsp, -16
12 // CHECK: .cfi_def_cfa wsp, -16
13 // DWARF: DW_CFA_advance_loc: 4 to 0x4
14 // DWARF: DW_CFA_def_cfa: WSP -16
15 .cfi_val_offset wsp, 0
16 // CHECK: .cfi_val_offset wsp, 0
17 // DWARF: DW_CFA_val_offset: WSP 0
18 nop
19 sub wsp, wsp, 16
20 .cfi_def_cfa wsp, 0
21 // CHECK: .cfi_def_cfa wsp, 0
22 // DWARF: DW_CFA_advance_loc: 8 to 0xc
23 // DWARF: DW_CFA_def_cfa: WSP +0
24 .cfi_register wsp, wsp
25 // CHECK: .cfi_register wsp, wsp
26 // DWARF: DW_CFA_register: WSP WSP
27 ret
28 .cfi_endproc
29 // CHECK: .cfi_endproc
32 // DWARF: 0x0: CFA=WSP
33 // DWARF: 0x4: CFA=WSP-16: WSP=CFA
34 // DWARF: 0xc: CFA=WSP: WSP=WSP