qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: [Qemu-devel] [PATCH] exec-all.h: Don't use stl_p for patching x86 jumps
Date: Tue, 13 May 2014 09:05:54 -0700	[thread overview]
Message-ID: <1399997154-19791-1-git-send-email-rth@twiddle.net> (raw)

Partial revert of 86360ad71df0070283469b8ae59f33cdd013501d,
because get the "wrong" version of stl_p, the one that does
byte swapping appropriate for the target.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 include/exec/exec-all.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 0766e24..2c0c2d5 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -229,7 +229,8 @@ void ppc_tb_set_jmp_target(unsigned long jmp_addr, unsigned long addr);
 static inline void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr)
 {
     /* patch the branch destination */
-    stl_p((void*)jmp_addr, addr - (jmp_addr + 4));
+    int32_t disp = addr - (jmp_addr + 4);
+    memcpy((void*)jmp_addr, &disp, 4);
     /* no need to flush icache explicitly */
 }
 #elif defined(__aarch64__)
-- 
1.9.0

             reply	other threads:[~2014-05-13 16:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13 16:05 Richard Henderson [this message]
2014-05-13 16:10 ` [Qemu-devel] [PATCH] exec-all.h: Don't use stl_p for patching x86 jumps Peter Maydell
2014-05-13 16:19   ` Richard Henderson
2014-05-13 16:55   ` Paolo Bonzini
2014-05-13 16:59     ` Richard Henderson

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=1399997154-19791-1-git-send-email-rth@twiddle.net \
    --to=rth@twiddle.net \
    --cc=peter.maydell@linaro.org \
    --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).