aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2017-12-06 09:30:50 +0000
committerAurelien Jarno <aurelien@aurel32.net>2017-12-18 23:01:33 +0100
commit6d56fc6cc372284a4571f09b361a9ccd99318103 (patch)
tree7c91d06f5858c56a42e965455ad79c0c70cf65fe /target
parente691e0ed135ac989221683ca9560c34d357edc57 (diff)
target/sh4: fix TCG leak during gusa sequence
This fixes bug #1735384 while running java under qemu-sh4. When debug was enabled it showed a problem with TCG temps. Once fixed I was able to run java -version normally. Cc: qemu-stable@nongnu.org Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20171206093050.25308-1-alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target')
-rw-r--r--target/sh4/translate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index f56808b45d..4a4a5c877e 100644
--- a/target/sh4/translate.c
+++ b/target/sh4/translate.c
@@ -2191,7 +2191,7 @@ static int decode_gusa(DisasContext *ctx, CPUSH4State *env, int *pmax_insns)
}
/* If op_src is not a valid register, then op_arg was a constant. */
- if (op_src < 0) {
+ if (op_src < 0 && !TCGV_IS_UNUSED(op_arg)) {
tcg_temp_free_i32(op_arg);
}