Debian Codegraph @

llvm/test/MC/MachO/AArch64/emit-dwarf-unwind.s

raw
1 // RUN: rm -rf %t; mkdir %t
2 // RUN: llvm-mc -triple x86_64-apple-macos11.0 %s -filetype=obj -o %t/x86_64.o -emit-compact-unwind-non-canonical=true
3 // RUN: llvm-objdump --macho --dwarf=frames %t/x86_64.o | FileCheck %s --check-prefix TWO-FDES
4 // RUN: llvm-mc -triple arm64-apple-macos11.0 %s -filetype=obj -o %t/arm64.o -emit-compact-unwind-non-canonical=true
5 // RUN: llvm-objdump --macho --dwarf=frames %t/arm64.o | FileCheck %s --check-prefix ONE-FDE
6 // RUN: llvm-mc -triple x86_64-apple-macos11.0 %s -filetype=obj --emit-dwarf-unwind no-compact-unwind -o %t/x86_64-no-dwarf.o -emit-compact-unwind-non-canonical=true
7 // RUN: llvm-objdump --macho --dwarf=frames %t/x86_64-no-dwarf.o | FileCheck %s --check-prefix ONE-FDE
8 // RUN: llvm-mc -triple arm64-apple-macos11.0 %s -filetype=obj --emit-dwarf-unwind always -o %t/arm64-dwarf.o -emit-compact-unwind-non-canonical=true
9 // RUN: llvm-objdump --macho --dwarf=frames %t/arm64-dwarf.o | FileCheck %s --check-prefix TWO-FDES
10
11 // TWO-FDES: FDE
12 // TWO-FDES: FDE
13
14 // ONE-FDE-NOT: FDE
15 // ONE-FDE: FDE
16 // ONE-FDE-NOT: FDE
17
18 _main:
19 .cfi_startproc
20 .cfi_def_cfa_offset 16
21 ret
22 .cfi_endproc
23
24 _foo:
25 .cfi_startproc
26 .cfi_def_cfa_offset 16
27 /// This encodes DW_CFA_GNU_args_size which cannot be expressed using compact
28 /// unwind, so we must use DWARf unwind for this function.
29 .cfi_escape 0x2e, 0x10
30 ret
31 .cfi_endproc
32
33 .subsections_via_symbols