summaryrefslogtreecommitdiffstats
path: root/target/alpha/translate.c
diff options
context:
space:
mode:
authorRichard Henderson2017-07-14 01:32:09 +0200
committerRichard Henderson2017-07-19 06:41:58 +0200
commita4535b8e3ef2b41e0e7d42293db912d44ad812f0 (patch)
tree2cf988925e43ce6dc4f7f1f6e31695f492a0f4d0 /target/alpha/translate.c
parenttarget/alpha: Fix temp leak in gen_bcond (diff)
downloadqemu-a4535b8e3ef2b41e0e7d42293db912d44ad812f0.tar.gz
qemu-a4535b8e3ef2b41e0e7d42293db912d44ad812f0.tar.xz
qemu-a4535b8e3ef2b41e0e7d42293db912d44ad812f0.zip
target/alpha: Fix temp leak in gen_mtpr
Tested-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target/alpha/translate.c')
-rw-r--r--target/alpha/translate.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/target/alpha/translate.c b/target/alpha/translate.c
index d684a7b613..5e37b1aca3 100644
--- a/target/alpha/translate.c
+++ b/target/alpha/translate.c
@@ -1392,7 +1392,6 @@ static ExitStatus gen_mfpr(DisasContext *ctx, TCGv va, int regno)
static ExitStatus gen_mtpr(DisasContext *ctx, TCGv vb, int regno)
{
- TCGv tmp;
int data;
switch (regno) {
@@ -1408,9 +1407,12 @@ static ExitStatus gen_mtpr(DisasContext *ctx, TCGv vb, int regno)
case 253:
/* WAIT */
- tmp = tcg_const_i64(1);
- tcg_gen_st32_i64(tmp, cpu_env, -offsetof(AlphaCPU, env) +
- offsetof(CPUState, halted));
+ {
+ TCGv_i32 tmp = tcg_const_i32(1);
+ tcg_gen_st_i32(tmp, cpu_env, -offsetof(AlphaCPU, env) +
+ offsetof(CPUState, halted));
+ tcg_temp_free_i32(tmp);
+ }
return gen_excp(ctx, EXCP_HALTED, 0);
case 252: