Commit 46d38ba89d37561a6fbf58a7ff567d0931b7c602

Authored by blueswir1
1 parent fda77c2d

Fix Sparc64 movr


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3045 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 2 deletions
target-sparc/translate.c
@@ -84,7 +84,7 @@ enum { @@ -84,7 +84,7 @@ enum {
84 GET_FIELD(X, 31 - (TO), 31 - (FROM)) 84 GET_FIELD(X, 31 - (TO), 31 - (FROM))
85 85
86 #define GET_FIELDs(x,a,b) sign_extend (GET_FIELD(x,a,b), (b) - (a) + 1) 86 #define GET_FIELDs(x,a,b) sign_extend (GET_FIELD(x,a,b), (b) - (a) + 1)
87 -#define GET_FIELD_SPs(x,a,b) sign_extend (GET_FIELD_SP(x,a,b), 32 - ((b) - (a) + 1)) 87 +#define GET_FIELD_SPs(x,a,b) sign_extend (GET_FIELD_SP(x,a,b), ((b) - (a) + 1))
88 88
89 #ifdef TARGET_SPARC64 89 #ifdef TARGET_SPARC64
90 #define DFPREG(r) (((r & 1) << 6) | (r & 0x1e)) 90 #define DFPREG(r) (((r & 1) << 6) | (r & 0x1e))
@@ -2226,7 +2226,7 @@ static void disas_sparc_insn(DisasContext * dc) @@ -2226,7 +2226,7 @@ static void disas_sparc_insn(DisasContext * dc)
2226 gen_movl_reg_T0(rs1); 2226 gen_movl_reg_T0(rs1);
2227 gen_cond_reg(cond); 2227 gen_cond_reg(cond);
2228 if (IS_IMM) { /* immediate */ 2228 if (IS_IMM) { /* immediate */
2229 - rs2 = GET_FIELD_SPs(insn, 0, 10); 2229 + rs2 = GET_FIELD_SPs(insn, 0, 9);
2230 gen_movl_simm_T1(rs2); 2230 gen_movl_simm_T1(rs2);
2231 } 2231 }
2232 else { 2232 else {