[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] ARM host: fix generated blocks linking
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [PATCH] ARM host: fix generated blocks linking |
Date: |
Fri, 25 Sep 2009 17:27:23 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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 <address@hidden>
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
address@hidden http://www.aurel32.net