Commit ee6c0b51e97c8bcad32181f42e63765b18c30354

Authored by bellard
1 parent 48dc41eb

sparc branch fix (Blue Swirl)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1999 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 5 additions and 5 deletions
target-sparc/translate.c
... ... @@ -956,8 +956,8 @@ static void disas_sparc_insn(DisasContext * dc)
956 956 int cc;
957 957  
958 958 target = GET_FIELD_SP(insn, 0, 18);
959   - target <<= 2;
960 959 target = sign_extend(target, 18);
  960 + target <<= 2;
961 961 cc = GET_FIELD_SP(insn, 20, 21);
962 962 if (cc == 0)
963 963 do_branch(dc, target, insn, 0);
... ... @@ -971,8 +971,8 @@ static void disas_sparc_insn(DisasContext * dc)
971 971 {
972 972 target = GET_FIELD_SP(insn, 0, 13) |
973 973 (GET_FIELD_SP(insn, 20, 21) >> 7);
974   - target <<= 2;
975 974 target = sign_extend(target, 16);
  975 + target <<= 2;
976 976 rs1 = GET_FIELD(insn, 13, 17);
977 977 gen_movl_reg_T0(rs1);
978 978 do_branch_reg(dc, target, insn);
... ... @@ -986,8 +986,8 @@ static void disas_sparc_insn(DisasContext * dc)
986 986 gen_op_trap_ifnofpu();
987 987 #endif
988 988 target = GET_FIELD_SP(insn, 0, 18);
989   - target <<= 2;
990 989 target = sign_extend(target, 19);
  990 + target <<= 2;
991 991 do_fbranch(dc, target, insn, cc);
992 992 goto jmp_insn;
993 993 }
... ... @@ -995,8 +995,8 @@ static void disas_sparc_insn(DisasContext * dc)
995 995 case 0x2: /* BN+x */
996 996 {
997 997 target = GET_FIELD(insn, 10, 31);
998   - target <<= 2;
999 998 target = sign_extend(target, 22);
  999 + target <<= 2;
1000 1000 do_branch(dc, target, insn, 0);
1001 1001 goto jmp_insn;
1002 1002 }
... ... @@ -1007,8 +1007,8 @@ static void disas_sparc_insn(DisasContext * dc)
1007 1007 gen_op_trap_ifnofpu();
1008 1008 #endif
1009 1009 target = GET_FIELD(insn, 10, 31);
1010   - target <<= 2;
1011 1010 target = sign_extend(target, 22);
  1011 + target <<= 2;
1012 1012 do_fbranch(dc, target, insn, 0);
1013 1013 goto jmp_insn;
1014 1014 }
... ...