1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef __ASM_ASM_EXTABLE_H
3 #define __ASM_ASM_EXTABLE_H
7 #define __ASM_EXTABLE_RAW(insn, fixup) \
8 .pushsection __ex_table, "a"; \
11 .long ((fixup) - .); \
14 .macro _asm_extable, insn, fixup
15 __ASM_EXTABLE_RAW(\insn, \fixup)
18 #else /* __ASSEMBLY__ */
20 #include <linux/stringify.h>
22 #define __ASM_EXTABLE_RAW(insn, fixup) \
23 ".pushsection __ex_table, \"a\"\n" \
25 ".long ((" insn ") - .)\n" \
26 ".long ((" fixup ") - .)\n" \
29 #define _ASM_EXTABLE(insn, fixup) __ASM_EXTABLE_RAW(#insn, #fixup)
31 #endif /* __ASSEMBLY__ */
33 #endif /* __ASM_ASM_EXTABLE_H */