From: Ian Campbell Subject: Re: [PATCH] xen: arm: let the compiler choose the dummy register for TLB flush asm Date: Thu, 25 Apr 2013 16:20:49 +0100 Message-ID: <1366903249.20256.564.camel@zakaz.uk.xensource.com> References: <1366809685-31618-1-git-send-email-ian.campbell@citrix.com> <20130424141701.GA23761@ocelot.phlegethon.org> <1366816476.20256.369.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1366816476.20256.369.camel@zakaz.uk.xensource.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: "Tim (Xen.org)" Cc: "xen-devel@lists.xen.org" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Wed, 2013-04-24 at 16:14 +0100, Ian Campbell wrote: > On Wed, 2013-04-24 at 15:17 +0100, Tim Deegan wrote: > > At 14:21 +0100 on 24 Apr (1366813285), Ian Campbell wrote: > > > While staring at some disassembly I noticed that the compiler was jumping > > > through hoops to preserve the function argument (in r0) simply so it could use > > > r0 as the dummy argument to the tlb flush cp register writes. > > > > > > Remove the enforced use of r0 and use an output constraint for the dummy > > > register so there is no need to initialise the dummy. > > > > Since we don't care about the register's contents and it's not changed, > > can we just drop the variable and constraint entirely? > > and just hard code the r0? I hadn't though of that, I suppose we could > yes. Scuppered because our clever STORE_CP32 macros add % to their argument. I don't really want to change those macros, I suppose I could add DUMMY_CP32 which just takes a name and inputs a dummy reigster. Ian