From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MrCmg-0006vY-05 for qemu-devel@nongnu.org; Fri, 25 Sep 2009 11:32:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MrCma-0006u6-PX for qemu-devel@nongnu.org; Fri, 25 Sep 2009 11:32:33 -0400 Received: from [199.232.76.173] (port=45791 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MrCma-0006u3-Nc for qemu-devel@nongnu.org; Fri, 25 Sep 2009 11:32:28 -0400 Received: from mail-fx0-f214.google.com ([209.85.220.214]:36758) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MrCma-0004WU-Eo for qemu-devel@nongnu.org; Fri, 25 Sep 2009 11:32:28 -0400 Received: by fxm10 with SMTP id 10so2327108fxm.8 for ; Fri, 25 Sep 2009 08:32:27 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20090925152723.GB14026@volta.aurel32.net> References: <761ea48b0909210527i6ed97be5s4208d7a0227d9de5@mail.gmail.com> <20090925152723.GB14026@volta.aurel32.net> Date: Fri, 25 Sep 2009 17:32:27 +0200 Message-ID: <761ea48b0909250832q69faad46tab35f23bdb48f96b@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH] ARM host: fix generated blocks linking From: Laurent Desnogues Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel@nongnu.org On Fri, Sep 25, 2009 at 5:27 PM, Aurelien Jarno wrot= e: > 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? Well it used to work by accident; it's fundamentally broken since it just 'or' some new bits with existing ones (which are there due to internal relocation). So I think, it should be applied to stable too. Laurent >> 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 >> =A0#endif >> >> =A0 =A0 =A0/* we could use a ldr pc, [pc, #-4] kind of branch and avoid = the flush */ >> - =A0 =A0*(uint32_t *)jmp_addr |=3D ((addr - (jmp_addr + 8)) >> 2) & 0xf= fffff; >> + =A0 =A0*(uint32_t *)jmp_addr =3D >> + =A0 =A0 =A0 =A0(*(uint32_t *)jmp_addr & ~0xffffff) >> + =A0 =A0 =A0 =A0| (((addr - (jmp_addr + 8)) >> 2) & 0xffffff); >> >> =A0#if QEMU_GNUC_PREREQ(4, 1) >> =A0 =A0 =A0__clear_cache((char *) jmp_addr, (char *) jmp_addr + 4); > > > -- > Aurelien Jarno =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0GPG: 10= 24D/F1BCDB73 > aurelien@aurel32.net =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://www.aurel32.n= et >