[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [mini-os master] x86_64: introduce and use SAVE_ALL
commit ac290d5cfaf6199d1063c28027f5c0d4a38fa62a Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Thu Aug 25 15:52:38 2016 +0100 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Fri Aug 26 09:12:23 2016 +0100 x86_64: introduce and use SAVE_ALL Introduce this macro to match RESTORE_ALL. Also delete the unused SAVE_REST. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Reviewed-by: Juergen Gross <jgross@xxxxxxxx> Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> --- arch/x86/x86_64.S | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/arch/x86/x86_64.S b/arch/x86/x86_64.S index 8432d69..21fa61b 100644 --- a/arch/x86/x86_64.S +++ b/arch/x86/x86_64.S @@ -119,14 +119,26 @@ KERNEL_CS_MASK = 0xfc addq $15*8+8,%rsp .endm -.macro SAVE_REST - subq $6*8,%rsp +.macro SAVE_ALL + /* rdi slot contains rax, oldrax contains error code */ + cld + subq $14*8,%rsp + movq %rsi,13*8(%rsp) + movq 14*8(%rsp),%rsi /* load rax from rdi slot */ + movq %rdx,12*8(%rsp) + movq %rcx,11*8(%rsp) + movq %rsi,10*8(%rsp) /* store rax */ + movq %r8, 9*8(%rsp) + movq %r9, 8*8(%rsp) + movq %r10,7*8(%rsp) + movq %r11,6*8(%rsp) movq %rbx,5*8(%rsp) movq %rbp,4*8(%rsp) movq %r12,3*8(%rsp) movq %r13,2*8(%rsp) movq %r14,1*8(%rsp) movq %r15,(%rsp) + movq %rdi, RDI(%rsp) /* put rdi into the slot */ .endm .macro HYPERVISOR_IRET flag @@ -154,26 +166,8 @@ KERNEL_CS_MASK = 0xfc * and the exception handler in %rax. */ ENTRY(error_entry) - /* rdi slot contains rax, oldrax contains error code */ - cld - subq $14*8,%rsp - movq %rsi,13*8(%rsp) - movq 14*8(%rsp),%rsi /* load rax from rdi slot */ - movq %rdx,12*8(%rsp) - movq %rcx,11*8(%rsp) - movq %rsi,10*8(%rsp) /* store rax */ - movq %r8, 9*8(%rsp) - movq %r9, 8*8(%rsp) - movq %r10,7*8(%rsp) - movq %r11,6*8(%rsp) - movq %rbx,5*8(%rsp) - movq %rbp,4*8(%rsp) - movq %r12,3*8(%rsp) - movq %r13,2*8(%rsp) - movq %r14,1*8(%rsp) - movq %r15,(%rsp) - - movq %rdi, RDI(%rsp) + SAVE_ALL + movq %rsp,%rdi movq ORIG_RAX(%rsp),%rsi # get error code movq $-1,ORIG_RAX(%rsp) -- generated by git-patchbot for /home/xen/git/mini-os.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |