diff mbox

target-arm: Fix TCG temporary leaks for scalar VMULL

Message ID 1299850354-21799-1-git-send-email-peter.maydell@linaro.org
State Accepted
Commit 7d2aabe262846ddeda1785d42ff4d7964e8ac1c8
Headers show

Commit Message

Peter Maydell March 11, 2011, 1:32 p.m. UTC
Fix a TCG temporary leak when translating 32-bit scalar VMULL.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
This was found by the TCG leak-checking support that was committed a
little while back. Score one for debug code :-)

 target-arm/translate.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Aurelien Jarno March 22, 2011, 6:58 a.m. UTC | #1
On Fri, Mar 11, 2011 at 01:32:34PM +0000, Peter Maydell wrote:
> Fix a TCG temporary leak when translating 32-bit scalar VMULL.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> This was found by the TCG leak-checking support that was committed a
> little while back. Score one for debug code :-)
> 
>  target-arm/translate.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

Thanks, applied.

> diff --git a/target-arm/translate.c b/target-arm/translate.c
> index 062de5e..e8ec987 100644
> --- a/target-arm/translate.c
> +++ b/target-arm/translate.c
> @@ -4157,10 +4157,12 @@ static inline void gen_neon_mull(TCGv_i64 dest, TCGv a, TCGv b, int size, int u)
>      case 4:
>          tmp = gen_muls_i64_i32(a, b);
>          tcg_gen_mov_i64(dest, tmp);
> +        tcg_temp_free_i64(tmp);
>          break;
>      case 5:
>          tmp = gen_mulu_i64_i32(a, b);
>          tcg_gen_mov_i64(dest, tmp);
> +        tcg_temp_free_i64(tmp);
>          break;
>      default: abort();
>      }
> -- 
> 1.7.1
> 
> 
>
diff mbox

Patch

diff --git a/target-arm/translate.c b/target-arm/translate.c
index 062de5e..e8ec987 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -4157,10 +4157,12 @@  static inline void gen_neon_mull(TCGv_i64 dest, TCGv a, TCGv b, int size, int u)
     case 4:
         tmp = gen_muls_i64_i32(a, b);
         tcg_gen_mov_i64(dest, tmp);
+        tcg_temp_free_i64(tmp);
         break;
     case 5:
         tmp = gen_mulu_i64_i32(a, b);
         tcg_gen_mov_i64(dest, tmp);
+        tcg_temp_free_i64(tmp);
         break;
     default: abort();
     }