From: Laurent Desnogues <laurent.desnogues@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] ARM host: fix generated blocks linking
Date: Mon, 21 Sep 2009 14:27:59 +0200 [thread overview]
Message-ID: <761ea48b0909210527i6ed97be5s4208d7a0227d9de5@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 198 bytes --]
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 <laurent.desnogues@gmail.com>
[-- Attachment #2: arm-block-link.patch --]
[-- Type: text/x-patch, Size: 586 bytes --]
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);
next reply other threads:[~2009-09-21 12:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-21 12:27 Laurent Desnogues [this message]
2009-09-25 15:27 ` [Qemu-devel] [PATCH] ARM host: fix generated blocks linking Aurelien Jarno
2009-09-25 15:32 ` Laurent Desnogues
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=761ea48b0909210527i6ed97be5s4208d7a0227d9de5@mail.gmail.com \
--to=laurent.desnogues@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).