mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-27 06:30:56 +07:00
a34746bc43
Instead of open-coding the __ex_table information at each callsite, construct a common macro that can work regardless of CPU size. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
40 lines
784 B
C
40 lines
784 B
C
#ifndef _ASM_X86_ASM_H
|
|
#define _ASM_X86_ASM_H
|
|
|
|
#ifdef CONFIG_X86_32
|
|
/* 32 bits */
|
|
|
|
# define _ASM_PTR " .long "
|
|
# define _ASM_ALIGN " .balign 4 "
|
|
# define _ASM_MOV_UL " movl "
|
|
|
|
# define _ASM_INC " incl "
|
|
# define _ASM_DEC " decl "
|
|
# define _ASM_ADD " addl "
|
|
# define _ASM_SUB " subl "
|
|
# define _ASM_XADD " xaddl "
|
|
|
|
#else
|
|
/* 64 bits */
|
|
|
|
# define _ASM_PTR " .quad "
|
|
# define _ASM_ALIGN " .balign 8 "
|
|
# define _ASM_MOV_UL " movq "
|
|
|
|
# define _ASM_INC " incq "
|
|
# define _ASM_DEC " decq "
|
|
# define _ASM_ADD " addq "
|
|
# define _ASM_SUB " subq "
|
|
# define _ASM_XADD " xaddq "
|
|
|
|
#endif /* CONFIG_X86_32 */
|
|
|
|
/* Exception table entry */
|
|
# define _ASM_EXTABLE(from,to) \
|
|
" .section __ex_table,\"a\"\n" \
|
|
_ASM_ALIGN "\n" \
|
|
_ASM_PTR #from "," #to "\n" \
|
|
" .previous\n"
|
|
|
|
#endif /* _ASM_X86_ASM_H */
|