Commit 21438f7c authored by Glauber de Oliveira Costa's avatar Glauber de Oliveira Costa Committed by Ingo Molnar

x86: add CLBR_ defines for 64-bit

x86_64 needs a potentially larger clobber list than i386, due to its calling
convention. So we add more CLBR_ defines for it.
Note that CLBR_ANY is different for each of the architectures, since it comprises
the notion of "All call clobbers in this architecture"
Signed-off-by: default avatarGlauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 1954448f
...@@ -8,11 +8,24 @@ ...@@ -8,11 +8,24 @@
#include <asm/asm.h> #include <asm/asm.h>
/* Bitmask of what can be clobbered: usually at least eax. */ /* Bitmask of what can be clobbered: usually at least eax. */
#define CLBR_NONE 0x0 #define CLBR_NONE 0
#define CLBR_EAX 0x1 #define CLBR_EAX (1 << 0)
#define CLBR_ECX 0x2 #define CLBR_ECX (1 << 1)
#define CLBR_EDX 0x4 #define CLBR_EDX (1 << 2)
#define CLBR_ANY 0x7
#ifdef CONFIG_X86_64
#define CLBR_RSI (1 << 3)
#define CLBR_RDI (1 << 4)
#define CLBR_R8 (1 << 5)
#define CLBR_R9 (1 << 6)
#define CLBR_R10 (1 << 7)
#define CLBR_R11 (1 << 8)
#define CLBR_ANY ((1 << 9) - 1)
#include <asm/desc_defs.h>
#else
/* CLBR_ANY should match all regs platform has. For i386, that's just it */
#define CLBR_ANY ((1 << 3) - 1)
#endif /* X86_64 */
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <linux/types.h> #include <linux/types.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment