qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: Stefan Weil <sw@weilnetz.de>
Cc: Blue Swirl <blauwirbel@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] ppc: Use uintptr_t for arguments of ppc_tb_set_jmp_target
Date: Tue, 20 Mar 2012 01:33:22 +0400 (MSK)	[thread overview]
Message-ID: <alpine.LNX.2.00.1203200129490.9465@linmac> (raw)
In-Reply-To: <1332191549-1311-2-git-send-email-sw@weilnetz.de>

On Mon, 19 Mar 2012, Stefan Weil wrote:

> 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_target1
> and ppc_tb_set_jmp_target so that both functions have the same signature.
> 
> Cc: malc <av1474@comtv.ru>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  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 jmp_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 addr)
> 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, const TCGArg *args,
>      tcg_out_bc (s, (BC | BI (7, CR_EQ) | BO_COND_TRUE), args[5]);
>  }
>  
> -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)
>  {
>      uint32_t *ptr;
>      long disp = addr - jmp_addr;

This should become intptr_t then..
That said ppc32 code assumes 32bit addresses, and ppc64 tcg_taget_long
wide ones.. IOW needs some thinking.

> diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
> index 409a1ac..c286322 100644
> --- a/tcg/ppc64/tcg-target.c
> +++ b/tcg/ppc64/tcg-target.c
> @@ -1233,7 +1233,7 @@ static void tcg_out_brcond (TCGContext *s, TCGCond cond,
>      tcg_out_bc (s, tcg_to_bc[cond], label_index);
>  }
>  
> -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)
>  {
>      TCGContext s;
>      unsigned long patch_size;
> 

-- 
mailto:av1474@comtv.ru

  reply	other threads:[~2012-03-19 21:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 21:12 [Qemu-devel] [PATCH 1/2] w64: Fix data type of tb_next and other variables used for host addresses Stefan Weil
2012-03-19 21:12 ` [Qemu-devel] [PATCH 2/2] ppc: Use uintptr_t for arguments of ppc_tb_set_jmp_target Stefan Weil
2012-03-19 21:33   ` malc [this message]
2012-03-19 21:56     ` Andreas Färber
2012-03-19 23:16       ` malc
2012-03-24 14:06 ` [Qemu-devel] [PATCH 1/2] w64: Fix data type of tb_next and other variables used for host addresses Blue Swirl
2012-03-24 21:25   ` [Qemu-devel] [PATCH v2 " Stefan Weil
2012-03-27 17:54     ` Richard Henderson
2012-03-29 20:27     ` Blue Swirl

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=alpine.LNX.2.00.1203200129490.9465@linmac \
    --to=av1474@comtv.ru \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /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).