From: Laurent Desnogues Date: Mon, 21 Sep 2009 12:27:59 +0000 (+0200) Subject: ARM host: fix generated blocks linking X-Git-Tag: TizenStudio_2.0_p2.3~7415 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=217eb09beb9fd4f38a65c46e60995d56caf6d903;p=sdk%2Femulator%2Fqemu.git ARM host: fix generated blocks linking This patch fixes the linking of generated blocks on an ARM host. No need to say this brings a very nice speedup :-) Signed-off-by: Laurent Desnogues Signed-off-by: Aurelien Jarno --- diff --git a/exec-all.h b/exec-all.h index 93e0b5d..dd134a9 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);