qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] exec-all.h: Don't use stl_p for patching x86 jumps


From: Richard Henderson
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

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 <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
 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 via email to

[Prev in Thread] Current Thread [Next in Thread]