18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _ASM_X86_DWARF2_H 38c2ecf20Sopenharmony_ci#define _ASM_X86_DWARF2_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#ifndef __ASSEMBLY__ 68c2ecf20Sopenharmony_ci#warning "asm/dwarf2.h should be only included in pure assembly files" 78c2ecf20Sopenharmony_ci#endif 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#define CFI_STARTPROC .cfi_startproc 108c2ecf20Sopenharmony_ci#define CFI_ENDPROC .cfi_endproc 118c2ecf20Sopenharmony_ci#define CFI_DEF_CFA .cfi_def_cfa 128c2ecf20Sopenharmony_ci#define CFI_DEF_CFA_REGISTER .cfi_def_cfa_register 138c2ecf20Sopenharmony_ci#define CFI_DEF_CFA_OFFSET .cfi_def_cfa_offset 148c2ecf20Sopenharmony_ci#define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset 158c2ecf20Sopenharmony_ci#define CFI_OFFSET .cfi_offset 168c2ecf20Sopenharmony_ci#define CFI_REL_OFFSET .cfi_rel_offset 178c2ecf20Sopenharmony_ci#define CFI_REGISTER .cfi_register 188c2ecf20Sopenharmony_ci#define CFI_RESTORE .cfi_restore 198c2ecf20Sopenharmony_ci#define CFI_REMEMBER_STATE .cfi_remember_state 208c2ecf20Sopenharmony_ci#define CFI_RESTORE_STATE .cfi_restore_state 218c2ecf20Sopenharmony_ci#define CFI_UNDEFINED .cfi_undefined 228c2ecf20Sopenharmony_ci#define CFI_ESCAPE .cfi_escape 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#ifndef BUILD_VDSO 258c2ecf20Sopenharmony_ci /* 268c2ecf20Sopenharmony_ci * Emit CFI data in .debug_frame sections, not .eh_frame sections. 278c2ecf20Sopenharmony_ci * The latter we currently just discard since we don't do DWARF 288c2ecf20Sopenharmony_ci * unwinding at runtime. So only the offline DWARF information is 298c2ecf20Sopenharmony_ci * useful to anyone. Note we should not use this directive if we 308c2ecf20Sopenharmony_ci * ever decide to enable DWARF unwinding at runtime. 318c2ecf20Sopenharmony_ci */ 328c2ecf20Sopenharmony_ci .cfi_sections .debug_frame 338c2ecf20Sopenharmony_ci#else 348c2ecf20Sopenharmony_ci /* 358c2ecf20Sopenharmony_ci * For the vDSO, emit both runtime unwind information and debug 368c2ecf20Sopenharmony_ci * symbols for the .dbg file. 378c2ecf20Sopenharmony_ci */ 388c2ecf20Sopenharmony_ci .cfi_sections .eh_frame, .debug_frame 398c2ecf20Sopenharmony_ci#endif 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci#endif /* _ASM_X86_DWARF2_H */ 42