aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtyom Tarasenko <atar4qemu@gmail.com>2016-06-08 14:17:36 +0200
committerArtyom Tarasenko <atar4qemu@gmail.com>2017-01-18 22:03:44 +0100
commit5c65df364af0a2cc60af318e5a3011ae5fce293a (patch)
treec8fff2a3e07451f69a03e2d3b8a032756be9ff80
parentf7f17ef75c9c90db63c44d11dc16fc085ca2c474 (diff)
target-sparc: fix immediate UA2005 traps
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
-rw-r--r--target/sparc/translate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 399a8ac8dd..109997684a 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -3298,7 +3298,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
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(trap, (rs2 & mask) + TT_TRAP);
/* Signal that the trap value is fully constant. */