From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9kZK-0004pO-8N for qemu-devel@nongnu.org; Mon, 19 Mar 2012 17:56:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9kZI-0005JS-45 for qemu-devel@nongnu.org; Mon, 19 Mar 2012 17:56:45 -0400 Received: from cantor2.suse.de ([195.135.220.15]:54450 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9kZH-0005JO-R2 for qemu-devel@nongnu.org; Mon, 19 Mar 2012 17:56:44 -0400 Message-ID: <4F67AB98.7010107@suse.de> Date: Mon, 19 Mar 2012 22:56:40 +0100 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1332191549-1311-1-git-send-email-sw@weilnetz.de> <1332191549-1311-2-git-send-email-sw@weilnetz.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] ppc: Use uintptr_t for arguments of ppc_tb_set_jmp_target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: Blue Swirl , Stefan Weil , qemu-devel@nongnu.org Am 19.03.2012 22:33, schrieb malc: > On Mon, 19 Mar 2012, Stefan Weil wrote: >=20 >> The previous commit changed function tb_set_jmp_target1 and is needed >> for w64 hosts. >> >> This patch is not needed for w64, but it synchronizes tb_set_jmp_targe= t1 >> and ppc_tb_set_jmp_target so that both functions have the same signatu= re. >> >> Cc: malc >> Signed-off-by: Stefan Weil >> --- >> exec-all.h | 2 +- >> tcg/ppc/tcg-target.c | 2 +- >> tcg/ppc64/tcg-target.c | 2 +- >> 3 files changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/exec-all.h b/exec-all.h >> index a6d6519..9ffd778 100644 >> --- a/exec-all.h >> +++ b/exec-all.h >> @@ -199,7 +199,7 @@ static inline void tb_set_jmp_target1(uintptr_t jm= p_addr, uintptr_t addr) >> /* no need to flush icache explicitly */ >> } >> #elif defined(_ARCH_PPC) >> -void ppc_tb_set_jmp_target(unsigned long jmp_addr, unsigned long addr= ); >> +void ppc_tb_set_jmp_target(uintptr_t jmp_addr, uintptr_t addr); >> #define tb_set_jmp_target1 ppc_tb_set_jmp_target >> #elif defined(__i386__) || defined(__x86_64__) >> static inline void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t a= ddr) >> diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c >> index b0aa914..57000e5 100644 >> --- a/tcg/ppc/tcg-target.c >> +++ b/tcg/ppc/tcg-target.c >> @@ -1305,7 +1305,7 @@ static void tcg_out_brcond2 (TCGContext *s, cons= t TCGArg *args, >> tcg_out_bc (s, (BC | BI (7, CR_EQ) | BO_COND_TRUE), args[5]); >> } >> =20 >> -void ppc_tb_set_jmp_target (unsigned long jmp_addr, unsigned long add= r) >> +void ppc_tb_set_jmp_target (uintptr_t jmp_addr, uintptr_t addr) >> { >> uint32_t *ptr; >> long disp =3D addr - jmp_addr; >=20 > This should become intptr_t then.. > That said ppc32 code assumes 32bit addresses, and ppc64 tcg_taget_long > wide ones.. IOW needs some thinking. Hm? On both host platforms relevant here, Linux and Darwin, long and intptr_t should have the same width, on both ppc and ppc64, so no practical difference. I was about to add my Acked-by - where do you see issues? Or do you just see room for further code improvements elsewhere? Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg