* [PATCH] x86-64/asm: use negative immediates for stack adjustments
@ 2015-06-01 12:02 Jan Beulich
2015-06-02 8:24 ` [tip:x86/asm] x86/asm/entry/64: Use " tip-bot for Jan Beulich
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2015-06-01 12:02 UTC (permalink / raw)
To: mingo, tglx, hpa; +Cc: linux-kernel
Doing so allows adjustments by 128 bytes (occurring for
REMOVE_PT_GPREGS_FROM_STACK 8 uses) to be expressed with a single byte
immediate.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
arch/x86/include/asm/calling.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- 4.1-rc6/arch/x86/include/asm/calling.h
+++ 4.1-rc6-x86_64-invert-stack-adjust/arch/x86/include/asm/calling.h
@@ -91,7 +91,7 @@ For 32-bit we have the following convent
#define SIZEOF_PTREGS 21*8
.macro ALLOC_PT_GPREGS_ON_STACK addskip=0
- subq $15*8+\addskip, %rsp
+ addq $-(15*8+\addskip), %rsp
CFI_ADJUST_CFA_OFFSET 15*8+\addskip
.endm
@@ -204,7 +204,7 @@ For 32-bit we have the following convent
.endm
.macro REMOVE_PT_GPREGS_FROM_STACK addskip=0
- addq $15*8+\addskip, %rsp
+ subq $-(15*8+\addskip), %rsp
CFI_ADJUST_CFA_OFFSET -(15*8+\addskip)
.endm
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:x86/asm] x86/asm/entry/64: Use negative immediates for stack adjustments
2015-06-01 12:02 [PATCH] x86-64/asm: use negative immediates for stack adjustments Jan Beulich
@ 2015-06-02 8:24 ` tip-bot for Jan Beulich
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Jan Beulich @ 2015-06-02 8:24 UTC (permalink / raw)
To: linux-tip-commits
Cc: peterz, jbeulich, bp, JBeulich, hpa, torvalds, linux-kernel,
brgerst, dvlasenk, luto, tglx, mingo
Commit-ID: 2bf557ea3f49576fabe24cd5daf1a34e9ee22c3c
Gitweb: http://git.kernel.org/tip/2bf557ea3f49576fabe24cd5daf1a34e9ee22c3c
Author: Jan Beulich <JBeulich@suse.com>
AuthorDate: Mon, 1 Jun 2015 13:02:55 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 2 Jun 2015 10:10:09 +0200
x86/asm/entry/64: Use negative immediates for stack adjustments
Doing so allows adjustments by 128 bytes (occurring for
REMOVE_PT_GPREGS_FROM_STACK 8 uses) to be expressed with a
single byte immediate.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/556C660F020000780007FB60@mail.emea.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/include/asm/calling.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/calling.h b/arch/x86/include/asm/calling.h
index 0d76acc..f4e6308 100644
--- a/arch/x86/include/asm/calling.h
+++ b/arch/x86/include/asm/calling.h
@@ -89,7 +89,7 @@ For 32-bit we have the following conventions - kernel is built with
#define SIZEOF_PTREGS 21*8
.macro ALLOC_PT_GPREGS_ON_STACK addskip=0
- subq $15*8+\addskip, %rsp
+ addq $-(15*8+\addskip), %rsp
.endm
.macro SAVE_C_REGS_HELPER offset=0 rax=1 rcx=1 r8910=1 r11=1
@@ -201,7 +201,7 @@ For 32-bit we have the following conventions - kernel is built with
.endm
.macro REMOVE_PT_GPREGS_FROM_STACK addskip=0
- addq $15*8+\addskip, %rsp
+ subq $-(15*8+\addskip), %rsp
.endm
.macro icebp
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-02 8:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-01 12:02 [PATCH] x86-64/asm: use negative immediates for stack adjustments Jan Beulich
2015-06-02 8:24 ` [tip:x86/asm] x86/asm/entry/64: Use " tip-bot for Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).