target-sparc: fix immediate UA2005 traps

Backports commit 5c65df364af0a2cc60af318e5a3011ae5fce293a from qemu
This commit is contained in:
Artyom Tarasenko 2018-03-01 21:12:21 -05:00 committed by Lioncash
parent 2f2bde32bf
commit f07be0ac3f
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7

View File

@ -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. */