aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/asm.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/asm.h')
-rw-r--r--arch/x86/include/asm/asm.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h
index 676ee5807d86..b0dc91f4bedc 100644
--- a/arch/x86/include/asm/asm.h
+++ b/arch/x86/include/asm/asm.h
@@ -11,10 +11,12 @@
11# define __ASM_FORM_COMMA(x) " " #x "," 11# define __ASM_FORM_COMMA(x) " " #x ","
12#endif 12#endif
13 13
14#ifdef CONFIG_X86_32 14#ifndef __x86_64__
15/* 32 bit */
15# define __ASM_SEL(a,b) __ASM_FORM(a) 16# define __ASM_SEL(a,b) __ASM_FORM(a)
16# define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(a) 17# define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(a)
17#else 18#else
19/* 64 bit */
18# define __ASM_SEL(a,b) __ASM_FORM(b) 20# define __ASM_SEL(a,b) __ASM_FORM(b)
19# define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(b) 21# define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(b)
20#endif 22#endif
@@ -132,4 +134,15 @@
132/* For C file, we already have NOKPROBE_SYMBOL macro */ 134/* For C file, we already have NOKPROBE_SYMBOL macro */
133#endif 135#endif
134 136
137#ifndef __ASSEMBLY__
138/*
139 * This output constraint should be used for any inline asm which has a "call"
140 * instruction. Otherwise the asm may be inserted before the frame pointer
141 * gets set up by the containing function. If you forget to do this, objtool
142 * may print a "call without frame pointer save/setup" warning.
143 */
144register unsigned long current_stack_pointer asm(_ASM_SP);
145#define ASM_CALL_CONSTRAINT "+r" (current_stack_pointer)
146#endif
147
135#endif /* _ASM_X86_ASM_H */ 148#endif /* _ASM_X86_ASM_H */