]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/hppa: Do not return freed temporary
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 21 Feb 2019 22:01:07 +0000 (14:01 -0800)
committerRichard Henderson <richard.henderson@linaro.org>
Fri, 8 Mar 2019 01:43:12 +0000 (17:43 -0800)
For priv levels 1 & 2, we were doing so from do_ibranch_priv.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/hppa/translate.c

index b4fd307b7702b5f343e84d74801ada21315e3962..dad8ce563cf23c373423960d7d0719b419cd4e1e 100644 (file)
@@ -2007,16 +2007,15 @@ static TCGv_reg do_ibranch_priv(DisasContext *ctx, TCGv_reg offset)
         /* Privilege 0 is maximum and is allowed to decrease.  */
         return offset;
     case 3:
-        /* Privilege 3 is minimum and is never allowed increase.  */
+        /* Privilege 3 is minimum and is never allowed to increase.  */
         dest = get_temp(ctx);
         tcg_gen_ori_reg(dest, offset, 3);
         break;
     default:
-        dest = tcg_temp_new();
+        dest = get_temp(ctx);
         tcg_gen_andi_reg(dest, offset, -4);
         tcg_gen_ori_reg(dest, dest, ctx->privilege);
         tcg_gen_movcond_reg(TCG_COND_GTU, dest, dest, offset, dest, offset);
-        tcg_temp_free(dest);
         break;
     }
     return dest;