mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-04 18:49:41 +00:00

While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembly code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. So let's standardize on the __ASSEMBLER__ macro that is provided by the compilers now. This is a completely mechanical patch (done with a simple "sed -i" statement). Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Vineet Gupta <vgupta@kernel.org>
44 lines
1.0 KiB
C
44 lines
1.0 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2016-17 Synopsys, Inc. (www.synopsys.com)
|
|
*/
|
|
|
|
#ifndef _ASM_ARC_DWARF_H
|
|
#define _ASM_ARC_DWARF_H
|
|
|
|
#ifdef __ASSEMBLER__
|
|
|
|
#ifdef ARC_DW2_UNWIND_AS_CFI
|
|
|
|
#define CFI_STARTPROC .cfi_startproc
|
|
#define CFI_ENDPROC .cfi_endproc
|
|
#define CFI_DEF_CFA .cfi_def_cfa
|
|
#define CFI_DEF_CFA_OFFSET .cfi_def_cfa_offset
|
|
#define CFI_DEF_CFA_REGISTER .cfi_def_cfa_register
|
|
#define CFI_OFFSET .cfi_offset
|
|
#define CFI_REL_OFFSET .cfi_rel_offset
|
|
#define CFI_REGISTER .cfi_register
|
|
#define CFI_RESTORE .cfi_restore
|
|
#define CFI_UNDEFINED .cfi_undefined
|
|
|
|
#else
|
|
|
|
#define CFI_IGNORE #
|
|
|
|
#define CFI_STARTPROC CFI_IGNORE
|
|
#define CFI_ENDPROC CFI_IGNORE
|
|
#define CFI_DEF_CFA CFI_IGNORE
|
|
#define CFI_DEF_CFA_OFFSET CFI_IGNORE
|
|
#define CFI_DEF_CFA_REGISTER CFI_IGNORE
|
|
#define CFI_OFFSET CFI_IGNORE
|
|
#define CFI_REL_OFFSET CFI_IGNORE
|
|
#define CFI_REGISTER CFI_IGNORE
|
|
#define CFI_RESTORE CFI_IGNORE
|
|
#define CFI_UNDEFINED CFI_IGNORE
|
|
|
|
#endif /* !ARC_DW2_UNWIND_AS_CFI */
|
|
|
|
#endif /* __ASSEMBLER__ */
|
|
|
|
#endif /* _ASM_ARC_DWARF_H */
|