From: Daniel Kiper Subject: Re: [PATCH] x86/setup: Correct register clobbers for the asm statement when resyncing the stack Date: Mon, 20 Oct 2014 22:21:59 +0200 Message-ID: <20141020202159.GK3467@olila.local.net-space.pl> References: <1413826207-2974-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1413826207-2974-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Keir Fraser , Jan Beulich , Xen-devel List-Id: xen-devel@lists.xenproject.org On Mon, Oct 20, 2014 at 06:30:07PM +0100, Andrew Cooper wrote: > When resyncing the stack, the asm statement does not identify %rsi, %rdi and > %rcx as clobbered by the 'rep movsq'. > > Luckily, there are no functional problems in the generated code. GCC decides > not to save any of them before calling boostrap_map(), which clobbers them. > > Correct the clobbers, by listing them as earlyclobber discarded outputs. > > Reported-by: Daniel Kiper > Signed-off-by: Andrew Cooper > CC: Keir Fraser > CC: Jan Beulich > > --- > > I have done an audit of the other uses of `rep $STRINGOP` and this is the only > asm statement with incorrect clobbers. > --- > xen/arch/x86/setup.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) Reviewed-by: Daniel Kiper Tested-by: Daniel Kiper Daniel