Received: from eggs.gnu.org ([140.186.70.92]:50385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QieMP-00021f-6d for qemu-devel@nongnu.org; Sun, 17 Jul 2011 23:19:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QieMM-0003Au-5N for qemu-devel@nongnu.org; Sun, 17 Jul 2011 23:19:08 -0400 Received: from mprc.pku.edu.cn ([162.105.203.9]:42712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QieML-0003A6-An for qemu-devel@nongnu.org; Sun, 17 Jul 2011 23:19:05 -0400 From: Guan Xuetao In-Reply-To: <1310758694-6360-2-git-send-email-weil@mail.berlios.de> References: <1310758694-6360-1-git-send-email-weil@mail.berlios.de> <1310758694-6360-2-git-send-email-weil@mail.berlios.de> Content-Type: text/plain; charset="UTF-8" Date: Mon, 18 Jul 2011 11:19:26 +0800 Message-ID: <1310959166.30422.2.camel@epip-laptop> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] Fix conversions from pointer to tcg_target_long Reply-To: gxt@mprc.pku.edu.cn List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Blue Swirl , QEMU Developers , Alexander Graf It's good for unicore32 bit. Acked-by: Guan Xuetao Thanks & Regards. Guan Xuetao On Fri, 2011-07-15 at 21:38 +0200, Stefan Weil wrote: > tcg_gen_exit_tb takes a parameter of type tcg_target_long, > so the type casts of pointer to long should be replaced by > type casts of pointer to tcg_target_long. > > These changes are needed for build environments where > sizeof(long) != sizeof(void *), especially for w64. > > See 4b4a72e55660abf7efe85aca78762dcfea5519ad which fixed the > same issue for the other targets. > > Cc: Alexander Graf > Cc: Guan Xuetao > Signed-off-by: Stefan Weil > --- > target-s390x/translate.c | 2 +- > target-unicore32/translate.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target-s390x/translate.c b/target-s390x/translate.c > index 77fb448..6a22fde 100644 > --- a/target-s390x/translate.c > +++ b/target-s390x/translate.c > @@ -830,7 +830,7 @@ static inline void gen_goto_tb(DisasContext *s, int tb_num, target_ulong pc) > /* jump to same page: we can use a direct jump */ > tcg_gen_goto_tb(tb_num); > tcg_gen_movi_i64(psw_addr, pc); > - tcg_gen_exit_tb((long)tb + tb_num); > + tcg_gen_exit_tb((tcg_target_long)tb + tb_num); > } else { > /* jump to another page: currently not optimized */ > tcg_gen_movi_i64(psw_addr, pc); > diff --git a/target-unicore32/translate.c b/target-unicore32/translate.c > index a15e42d..4ecb0f1 100644 > --- a/target-unicore32/translate.c > +++ b/target-unicore32/translate.c > @@ -1056,7 +1056,7 @@ static inline void gen_goto_tb(DisasContext *s, int n, uint32_t dest) > if ((tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK)) { > tcg_gen_goto_tb(n); > gen_set_pc_im(dest); > - tcg_gen_exit_tb((long)tb + n); > + tcg_gen_exit_tb((tcg_target_long)tb + n); > } else { > gen_set_pc_im(dest); > tcg_gen_exit_tb(0);