From f07be0ac3ffd5695d7b9eec6a6e1ff3c97acfdb7 Mon Sep 17 00:00:00 2001 From: Artyom Tarasenko Date: Thu, 1 Mar 2018 21:12:21 -0500 Subject: [PATCH] target-sparc: fix immediate UA2005 traps Backports commit 5c65df364af0a2cc60af318e5a3011ae5fce293a from qemu --- qemu/target-sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/target-sparc/translate.c b/qemu/target-sparc/translate.c index 7addaa05..50470f2c 100644 --- a/qemu/target-sparc/translate.c +++ b/qemu/target-sparc/translate.c @@ -3500,7 +3500,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn, bool hook_ins rs1 = GET_FIELD_SP(insn, 14, 18); if (IS_IMM) { - rs2 = GET_FIELD_SP(insn, 0, 6); + rs2 = GET_FIELD_SP(insn, 0, 7); if (rs1 == 0) { tcg_gen_movi_i32(tcg_ctx, trap, (rs2 & mask) + TT_TRAP); /* Signal that the trap value is fully constant. */