diff options
author | Borislav Petkov <bp@alien8.de> | 2011-05-31 22:21:53 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-06-03 14:38:53 -0700 |
commit | 838feb47549a9b73534c6c1d7da4a9639a0750f4 (patch) | |
tree | 8a8bba854694e69fc010f5dad6911949c1649384 /arch/x86/include/asm/calling.h | |
parent | cac0e0a78f722abd85b7f8d614ee0820f7672f58 (diff) | |
download | lwn-838feb47549a9b73534c6c1d7da4a9639a0750f4.tar.gz lwn-838feb47549a9b73534c6c1d7da4a9639a0750f4.zip |
x86, asm: Flip RESTORE_ARGS arguments logic
... thus getting rid of the "else" part of the conditional statement in
the macro.
No functionality change.
Signed-off-by: Borislav Petkov <bp@alien8.de>
Link: http://lkml.kernel.org/r/1306873314-32523-4-git-send-email-bp@alien8.de
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/include/asm/calling.h')
-rw-r--r-- | arch/x86/include/asm/calling.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/arch/x86/include/asm/calling.h b/arch/x86/include/asm/calling.h index b0b7d90d3054..a9e3a740f697 100644 --- a/arch/x86/include/asm/calling.h +++ b/arch/x86/include/asm/calling.h @@ -109,32 +109,27 @@ For 32-bit we have the following conventions - kernel is built with #define ARG_SKIP (9*8) - .macro RESTORE_ARGS skiprax=0, addskip=0, skiprcx=0, skipr11=0, \ - skipr8910=0, skiprdx=0 - .if \skipr11 - .else + .macro RESTORE_ARGS rstor_rax=1, addskip=0, rstor_rcx=1, rstor_r11=1, \ + rstor_r8910=1, rstor_rdx=1 + .if \rstor_r11 movq_cfi_restore 0*8, r11 .endif - .if \skipr8910 - .else + .if \rstor_r8910 movq_cfi_restore 1*8, r10 movq_cfi_restore 2*8, r9 movq_cfi_restore 3*8, r8 .endif - .if \skiprax - .else + .if \rstor_rax movq_cfi_restore 4*8, rax .endif - .if \skiprcx - .else + .if \rstor_rcx movq_cfi_restore 5*8, rcx .endif - .if \skiprdx - .else + .if \rstor_rdx movq_cfi_restore 6*8, rdx .endif @@ -193,7 +188,7 @@ For 32-bit we have the following conventions - kernel is built with .macro RESTORE_ALL addskip=0 RESTORE_REST - RESTORE_ARGS 0, \addskip + RESTORE_ARGS 1, \addskip .endm .macro icebp |