diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-05-14 07:14:57 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-05-14 07:30:31 +0000 |
commit | 86f1f2aee8fa8dd6f25ead09433fa0c888db6d37 (patch) | |
tree | 5cf1adfa0ed0209ce2f7ded50ec7a6e1786ce5d8 | |
parent | a2589e5cf288971d66afd0d41f5eefb735419890 (diff) |
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>
-rw-r--r-- | target-sparc/translate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 9222cde160..fe99f0bfea 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -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) |