summaryrefslogtreecommitdiff
path: root/exec-all.h
diff options
context:
space:
mode:
authorLaurent Desnogues <laurent.desnogues@gmail.com>2009-09-21 14:27:59 +0200
committerAurelien Jarno <aurelien@aurel32.net>2009-09-25 17:25:37 +0200
commit87b78ad18f61864011779616d2010926d71d9881 (patch)
tree189420eeacc8f79f5574591ae23e5758c4f8dff3 /exec-all.h
parent979ba184aaa1746f13c79cde6eb4aa4ac758823c (diff)
downloadqemu-87b78ad18f61864011779616d2010926d71d9881.tar.gz
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 <laurent.desnogues@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'exec-all.h')
-rw-r--r--exec-all.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/exec-all.h b/exec-all.h
index 93e0b5ddfb..dd134a99f8 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);