Skip to contentSkip to conversation

target-moxie: Fix pointer-to-integer conversion (MinGW-w64)

PATCH Applied Stefan Weil 3 participants 5 messages Mar 24, 2013 – Mar 30, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-moxie: Fix pointer-to-integer conversion (MinGW-w64)

The type cast must use tcg_target_long instead of long.
This makes a difference for hosts where sizeof(long) != sizeof(void *).

Cc Anthony Green <[email protected]>
Cc Blue Swirl <[email protected]>
---
 target-moxie/translate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-moxie/translate.c +1 -1
index 34f166e..cc02bd3 100644
@@ -133,7 +133,7 @@ static inline void gen_goto_tb(CPUMoxieState *env, DisasContext *ctx,
         !ctx->singlestep_enabled) {
         tcg_gen_goto_tb(n);
         tcg_gen_movi_i32(cpu_pc, dest);
-        tcg_gen_exit_tb((long) tb + n);
+        tcg_gen_exit_tb((tcg_target_long)tb + n);
     } else {
         tcg_gen_movi_i32(cpu_pc, dest);
         if (ctx->singlestep_enabled) {
Signature · 1 line
1.7.10.4
#1 lore raw

Hi Stefan,

This change is fine by me.

It's not clear to me, as the author/maintainer of the moxie port, what my responsibility/authority is. Do I simply reply to patches like this with...

Looks good to me.

And then somebody commits it to the tree?

Thanks!

AG

Quoted 26 lines · Stefan Weil

The type cast must use tcg_target_long instead of long.
This makes a difference for hosts where sizeof(long) != sizeof(void *).

Cc Anthony Green <[email protected]>
Cc Blue Swirl <[email protected]>
---
 target-moxie/translate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-moxie/translate.c +1 -2
index 34f166e..cc02bd3 100644
@@ -133,7 +133,7 @@ static inline void gen_goto_tb(CPUMoxieState *env, DisasContext *ctx,
         !ctx->singlestep_enabled) {
         tcg_gen_goto_tb(n);
         tcg_gen_movi_i32(cpu_pc, dest);
-        tcg_gen_exit_tb((long) tb + n);
+        tcg_gen_exit_tb((tcg_target_long)tb + n);
     } else {
         tcg_gen_movi_i32(cpu_pc, dest);
         if (ctx->singlestep_enabled) {
--

1.7.10.4

#2 lore raw

Am 28.03.2013 20:00, schrieb Anthony Green:

Quoted 8 lines

Hi Stefan,

This change is fine by me.

It's not clear to me, as the author/maintainer of the moxie port, what my responsibility/authority is. Do I simply reply to patches like this with...

Quoted 8 lines

Looks good to me.

And then somebody commits it to the tree?

Thanks!

AG

Hi Anthony,

this was a build fix, so hopefully Blue Swirl or Anthony Liguori will commit it immediately when they see your Signed-off-by. Feedback from the maintainer is always welcome.

My patch is also a trivial modification which could be handled by the maintainers of qemu-trivial, but they won't because I did not cc [email protected].

For "normal" patches (and also in this case if the patch remains uncommitted for some time), the maintainer applies each patch to his/her personal tree, tells the author and the mailing list that this was done,and sends a pull request to the list (either after some time or when several patches were collected in the personal tree).

Regards,
Stefan

#3 lore raw
In reply to Anthony Green
Quoted 10 lines · Anthony Green

Hi Stefan,

This change is fine by me.

It's not clear to me, as the author/maintainer of the moxie port, what my responsibility/authority is. Do I simply reply to patches like this with...

Looks good to me.

I think Acked-by: or Reviewed-by: tags are fine too.

Quoted 2 lines

And then somebody commits it to the tree?

Yes, like I'm going to do now. You could also queue the patches to your tree (for example, if they collide with your work in progress) by using git am and then send the patches as part of your patch set or pull request. In that case, the From: field indicating the original submitter should be kept intact, but git am should do that for you.

In some cases, like trivial patches, fixing a build breakage or general refactoring which only needs minor changes to several targets, the committers do not wait too long for OK from target maintainers. Positive reviews with tags of course increase confidence to the patch and a Nack is always possible.

Quoted 33 lines

Thanks!

AG

Quoted 26 lines · Stefan Weil

The type cast must use tcg_target_long instead of long.
This makes a difference for hosts where sizeof(long) != sizeof(void *).

Cc Anthony Green <[email protected]>
Cc Blue Swirl <[email protected]>
---
 target-moxie/translate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-moxie/translate.c +1 -2
index 34f166e..cc02bd3 100644
@@ -133,7 +133,7 @@ static inline void gen_goto_tb(CPUMoxieState *env, DisasContext *ctx,
         !ctx->singlestep_enabled) {
         tcg_gen_goto_tb(n);
         tcg_gen_movi_i32(cpu_pc, dest);
-        tcg_gen_exit_tb((long) tb + n);
+        tcg_gen_exit_tb((tcg_target_long)tb + n);
     } else {
         tcg_gen_movi_i32(cpu_pc, dest);
         if (ctx->singlestep_enabled) {
--

1.7.10.4

Applied
#4 lore raw
In reply to Stefan Weil

Thanks, applied.

Quoted 26 lines · Stefan Weil

The type cast must use tcg_target_long instead of long.
This makes a difference for hosts where sizeof(long) != sizeof(void *).

Cc Anthony Green <[email protected]>
Cc Blue Swirl <[email protected]>
---
 target-moxie/translate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-moxie/translate.c +1 -2
index 34f166e..cc02bd3 100644
@@ -133,7 +133,7 @@ static inline void gen_goto_tb(CPUMoxieState *env, DisasContext *ctx,
         !ctx->singlestep_enabled) {
         tcg_gen_goto_tb(n);
         tcg_gen_movi_i32(cpu_pc, dest);
-        tcg_gen_exit_tb((long) tb + n);
+        tcg_gen_exit_tb((tcg_target_long)tb + n);
     } else {
         tcg_gen_movi_i32(cpu_pc, dest);
         if (ctx->singlestep_enabled) {
--

1.7.10.4