sparc64: fix incorrect BPcc target sign extension

Fix wrong number of bits used when sign extending the branch offset of BPcc
instructions.

Reported-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Blue Swirl 2011-05-14 07:14:57 +00:00
parent a2589e5cf2
commit 86f1f2aee8

View File

@ -1893,7 +1893,7 @@ static void disas_sparc_insn(DisasContext * dc)
int cc;
target = GET_FIELD_SP(insn, 0, 18);
target = sign_extend(target, 18);
target = sign_extend(target, 19);
target <<= 2;
cc = GET_FIELD_SP(insn, 20, 21);
if (cc == 0)