Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MrChk-0005fI-1P for qemu-devel@nongnu.org; Fri, 25 Sep 2009 11:27:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MrChj-0005f5-Gf for qemu-devel@nongnu.org; Fri, 25 Sep 2009 11:27:27 -0400 Received: from [199.232.76.173] (port=42264 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MrChj-0005ez-7K for qemu-devel@nongnu.org; Fri, 25 Sep 2009 11:27:27 -0400 Received: from hall.aurel32.net ([88.191.82.174]:54925) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MrChi-0003pf-Lo for qemu-devel@nongnu.org; Fri, 25 Sep 2009 11:27:26 -0400 Date: Fri, 25 Sep 2009 17:27:23 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] ARM host: fix generated blocks linking Message-ID: <20090925152723.GB14026@volta.aurel32.net> References: <761ea48b0909210527i6ed97be5s4208d7a0227d9de5@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <761ea48b0909210527i6ed97be5s4208d7a0227d9de5@mail.gmail.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Desnogues Cc: qemu-devel@nongnu.org On Mon, Sep 21, 2009 at 02:27:59PM +0200, Laurent Desnogues wrote: > Hello, > > this patch fixes the linking of generated blocks on an ARM host. > No need to say this brings a very nice speedup :-) > > > Laurent > > Signed-off-by: Laurent Desnogues Thanks, applied. Do you think it also apply to stable? > diff --git a/exec-all.h b/exec-all.h > index 51519ff..daafc78 100644 > --- a/exec-all.h > +++ b/exec-all.h > @@ -208,7 +208,9 @@ static inline void tb_set_jmp_target1(unsigned long jmp_addr, unsigned long addr > #endif > > /* we could use a ldr pc, [pc, #-4] kind of branch and avoid the flush */ > - *(uint32_t *)jmp_addr |= ((addr - (jmp_addr + 8)) >> 2) & 0xffffff; > + *(uint32_t *)jmp_addr = > + (*(uint32_t *)jmp_addr & ~0xffffff) > + | (((addr - (jmp_addr + 8)) >> 2) & 0xffffff); > > #if QEMU_GNUC_PREREQ(4, 1) > __clear_cache((char *) jmp_addr, (char *) jmp_addr + 4); -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net