diff mbox

[v2,08/12] target-s390x: Add missing tcg_temp_free_i64() in disas_a5(), opc == 0x8

Message ID 1306515816-5386-9-git-send-email-weil@mail.berlios.de
State Rejected
Headers show

Commit Message

Stefan Weil May 27, 2011, 5:03 p.m. UTC
load_reg() needs a matching tcg_temp_free_i64().

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 target-s390x/translate.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Alexander Graf May 28, 2011, 12:08 a.m. UTC | #1
On 27.05.2011, at 19:03, Stefan Weil wrote:

> load_reg() needs a matching tcg_temp_free_i64().
> 
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
> target-s390x/translate.c |    1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/target-s390x/translate.c b/target-s390x/translate.c
> index 81b8c5b..692de6e 100644
> --- a/target-s390x/translate.c
> +++ b/target-s390x/translate.c
> @@ -2365,6 +2365,7 @@ static void disas_a5(DisasContext *s, int op, int r1, int i2)
>         tcg_gen_shri_i64(tmp2, tmp, 48);
>         tcg_gen_trunc_i64_i32(tmp32, tmp2);
>         set_cc_nz_u32(s, tmp32);
> +        tcg_temp_free_i64(tmp);

tmp gets freed at the end of the function, so this one is bad.


Alex
diff mbox

Patch

diff --git a/target-s390x/translate.c b/target-s390x/translate.c
index 81b8c5b..692de6e 100644
--- a/target-s390x/translate.c
+++ b/target-s390x/translate.c
@@ -2365,6 +2365,7 @@  static void disas_a5(DisasContext *s, int op, int r1, int i2)
         tcg_gen_shri_i64(tmp2, tmp, 48);
         tcg_gen_trunc_i64_i32(tmp32, tmp2);
         set_cc_nz_u32(s, tmp32);
+        tcg_temp_free_i64(tmp);
         tcg_temp_free_i64(tmp2);
         tcg_temp_free_i32(tmp32);
         break;