x86: clean up include/asm-x86/calling.h
clean up include/asm-x86/calling.h. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
e3cfac84cf
commit
0c2bd5a5e3
1 changed files with 101 additions and 95 deletions
|
@ -2,13 +2,13 @@
|
||||||
* Some macros to handle stack frames in assembly.
|
* Some macros to handle stack frames in assembly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define R15 0
|
#define R15 0
|
||||||
#define R14 8
|
#define R14 8
|
||||||
#define R13 16
|
#define R13 16
|
||||||
#define R12 24
|
#define R12 24
|
||||||
#define RBP 32
|
#define RBP 32
|
||||||
#define RBX 40
|
#define RBX 40
|
||||||
|
|
||||||
/* arguments: interrupts/non tracing syscalls only save upto here*/
|
/* arguments: interrupts/non tracing syscalls only save upto here*/
|
||||||
#define R11 48
|
#define R11 48
|
||||||
#define R10 56
|
#define R10 56
|
||||||
|
@ -21,12 +21,14 @@
|
||||||
#define RDI 112
|
#define RDI 112
|
||||||
#define ORIG_RAX 120 /* + error_code */
|
#define ORIG_RAX 120 /* + error_code */
|
||||||
/* end of arguments */
|
/* end of arguments */
|
||||||
|
|
||||||
/* cpu exception frame or undefined in case of fast syscall. */
|
/* cpu exception frame or undefined in case of fast syscall. */
|
||||||
#define RIP 128
|
#define RIP 128
|
||||||
#define CS 136
|
#define CS 136
|
||||||
#define EFLAGS 144
|
#define EFLAGS 144
|
||||||
#define RSP 152
|
#define RSP 152
|
||||||
#define SS 160
|
#define SS 160
|
||||||
|
|
||||||
#define ARGOFFSET R11
|
#define ARGOFFSET R11
|
||||||
#define SWFRAME ORIG_RAX
|
#define SWFRAME ORIG_RAX
|
||||||
|
|
||||||
|
@ -60,7 +62,9 @@
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
#define ARG_SKIP 9*8
|
#define ARG_SKIP 9*8
|
||||||
.macro RESTORE_ARGS skiprax=0,addskip=0,skiprcx=0,skipr11=0,skipr8910=0,skiprdx=0
|
|
||||||
|
.macro RESTORE_ARGS skiprax=0, addskip=0, skiprcx=0, skipr11=0, \
|
||||||
|
skipr8910=0, skiprdx=0
|
||||||
.if \skipr11
|
.if \skipr11
|
||||||
.else
|
.else
|
||||||
movq (%rsp), %r11
|
movq (%rsp), %r11
|
||||||
|
@ -113,6 +117,7 @@
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
#define REST_SKIP 6*8
|
#define REST_SKIP 6*8
|
||||||
|
|
||||||
.macro SAVE_REST
|
.macro SAVE_REST
|
||||||
subq $REST_SKIP, %rsp
|
subq $REST_SKIP, %rsp
|
||||||
CFI_ADJUST_CFA_OFFSET REST_SKIP
|
CFI_ADJUST_CFA_OFFSET REST_SKIP
|
||||||
|
@ -160,3 +165,4 @@
|
||||||
.macro icebp
|
.macro icebp
|
||||||
.byte 0xf1
|
.byte 0xf1
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue