Received: from eggs.gnu.org ([2001:4830:134:3::10]:51653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkFDt-0001GE-0A for qemu-devel@nongnu.org; Tue, 13 May 2014 12:06:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkFDo-00019A-5u for qemu-devel@nongnu.org; Tue, 13 May 2014 12:06:32 -0400 Received: from mail-qg0-x235.google.com ([2607:f8b0:400d:c04::235]:57098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkFDo-000193-2x for qemu-devel@nongnu.org; Tue, 13 May 2014 12:06:28 -0400 Received: by mail-qg0-f53.google.com with SMTP id f51so669097qge.12 for ; Tue, 13 May 2014 09:06:27 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Tue, 13 May 2014 09:05:54 -0700 Message-Id: <1399997154-19791-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH] exec-all.h: Don't use stl_p for patching x86 jumps List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell 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 Signed-off-by: Richard Henderson --- 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