qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-microblaze: fix swx build breakage
@ 2012-06-05  2:31 Peter A. G. Crosthwaite
  2012-06-07  9:07 ` Edgar E. Iglesias
  0 siblings, 1 reply; 2+ messages in thread
From: Peter A. G. Crosthwaite @ 2012-06-05  2:31 UTC (permalink / raw)
  To: edgar.iglesias, sw, qemu-devel
  Cc: peter.crosthwaite, david.holsgrove, john.williams

The lazy initialisation of r_check was throwing an error on --enable-debug.
Removed the lazy initialisation of r_check and swx_addr.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
---
 target-microblaze/translate.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c
index e462eab..269f201 100644
--- a/target-microblaze/translate.c
+++ b/target-microblaze/translate.c
@@ -1095,7 +1095,7 @@ static void gen_store(DisasContext *dc, TCGv addr, TCGv val,
 
 static void dec_store(DisasContext *dc)
 {
-    TCGv t, *addr, swx_addr, r_check = 0;
+    TCGv t, *addr, swx_addr, r_check;
     int swx_skip = 0;
     unsigned int size, rev = 0, ex = 0;
 
@@ -1119,9 +1119,9 @@ static void dec_store(DisasContext *dc)
     sync_jmpstate(dc);
     addr = compute_ldst_addr(dc, &t);
 
+    r_check = tcg_temp_new();
+    swx_addr = tcg_temp_local_new();
     if (ex) { /* swx */
-        r_check = tcg_temp_new();
-        swx_addr = tcg_temp_local_new();
 
         /* Force addr into the swx_addr. */
         tcg_gen_mov_tl(swx_addr, *addr);
@@ -1211,11 +1211,12 @@ static void dec_store(DisasContext *dc)
         gen_helper_memalign(*addr, tcg_const_tl(dc->rd),
                             tcg_const_tl(1), tcg_const_tl(size - 1));
     }
+
     if (ex) {
         gen_set_label(swx_skip);
-        tcg_temp_free(r_check);
-        tcg_temp_free(swx_addr);
     }
+    tcg_temp_free(r_check);
+    tcg_temp_free(swx_addr);
 
     if (addr == &t)
         tcg_temp_free(t);
-- 
1.7.3.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] target-microblaze: fix swx build breakage
  2012-06-05  2:31 [Qemu-devel] [PATCH] target-microblaze: fix swx build breakage Peter A. G. Crosthwaite
@ 2012-06-07  9:07 ` Edgar E. Iglesias
  0 siblings, 0 replies; 2+ messages in thread
From: Edgar E. Iglesias @ 2012-06-07  9:07 UTC (permalink / raw)
  To: Peter A. G. Crosthwaite; +Cc: sw, david.holsgrove, qemu-devel, john.williams

On Tue, Jun 05, 2012 at 12:31:04PM +1000, Peter A. G. Crosthwaite wrote:
> The lazy initialisation of r_check was throwing an error on --enable-debug.
> Removed the lazy initialisation of r_check and swx_addr.

Applied, thanks!


> 
> Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
> ---
>  target-microblaze/translate.c |   11 ++++++-----
>  1 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c
> index e462eab..269f201 100644
> --- a/target-microblaze/translate.c
> +++ b/target-microblaze/translate.c
> @@ -1095,7 +1095,7 @@ static void gen_store(DisasContext *dc, TCGv addr, TCGv val,
>  
>  static void dec_store(DisasContext *dc)
>  {
> -    TCGv t, *addr, swx_addr, r_check = 0;
> +    TCGv t, *addr, swx_addr, r_check;
>      int swx_skip = 0;
>      unsigned int size, rev = 0, ex = 0;
>  
> @@ -1119,9 +1119,9 @@ static void dec_store(DisasContext *dc)
>      sync_jmpstate(dc);
>      addr = compute_ldst_addr(dc, &t);
>  
> +    r_check = tcg_temp_new();
> +    swx_addr = tcg_temp_local_new();
>      if (ex) { /* swx */
> -        r_check = tcg_temp_new();
> -        swx_addr = tcg_temp_local_new();
>  
>          /* Force addr into the swx_addr. */
>          tcg_gen_mov_tl(swx_addr, *addr);
> @@ -1211,11 +1211,12 @@ static void dec_store(DisasContext *dc)
>          gen_helper_memalign(*addr, tcg_const_tl(dc->rd),
>                              tcg_const_tl(1), tcg_const_tl(size - 1));
>      }
> +
>      if (ex) {
>          gen_set_label(swx_skip);
> -        tcg_temp_free(r_check);
> -        tcg_temp_free(swx_addr);
>      }
> +    tcg_temp_free(r_check);
> +    tcg_temp_free(swx_addr);
>  
>      if (addr == &t)
>          tcg_temp_free(t);
> -- 
> 1.7.3.2
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-07  9:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-05  2:31 [Qemu-devel] [PATCH] target-microblaze: fix swx build breakage Peter A. G. Crosthwaite
2012-06-07  9:07 ` Edgar E. Iglesias

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).