From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752462AbbFAMDI (ORCPT ); Mon, 1 Jun 2015 08:03:08 -0400 Received: from mail.emea.novell.com ([130.57.118.101]:56387 "EHLO mail.emea.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751384AbbFAMDA convert rfc822-to-8bit (ORCPT ); Mon, 1 Jun 2015 08:03:00 -0400 Message-Id: <556C660F020000780007FB60@mail.emea.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.0.1 Date: Mon, 01 Jun 2015 13:02:55 +0100 From: "Jan Beulich" To: , , Cc: Subject: [PATCH] x86-64/asm: use negative immediates for stack adjustments Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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