]> Git Repo - qemu.git/commitdiff
Fix conversions from pointer to tcg_target_long
authorStefan Weil <[email protected]>
Fri, 15 Jul 2011 19:38:12 +0000 (21:38 +0200)
committerBlue Swirl <[email protected]>
Sun, 21 Aug 2011 15:32:21 +0000 (15:32 +0000)
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 <[email protected]>
Cc: Guan Xuetao <[email protected]>
Acked-by: Guan Xuetao<[email protected]>
Acked-by: Alexander Graf <[email protected]>
Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
target-s390x/translate.c
target-unicore32/translate.c

index 77fb4482aaa904c22826924ab306228652154e1d..6a22fded577de2ffd3870c9ab03a629b1e04c4a3 100644 (file)
@@ -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);
index a15e42d66320a51c2b062839442257be2dc55d89..4ecb0f17040a05880dfd183f8ad1725c9d37bd9b 100644 (file)
@@ -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);
This page took 0.03549 seconds and 4 git commands to generate.