aboutsummaryrefslogtreecommitdiff
path: root/target-sparc
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-07-04 20:22:35 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-07-04 20:22:35 +0000
commit46d38ba89d37561a6fbf58a7ff567d0931b7c602 (patch)
tree689676a886a6cfa1f9e0de5f65a2d3aa8f4a0433 /target-sparc
parentfda77c2d65d15ed35b01f60be37a17e2cd83bfe3 (diff)
Fix Sparc64 movr
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3045 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc')
-rw-r--r--target-sparc/translate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index 110b804c7c..c69ffd9afd 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -84,7 +84,7 @@ enum {
GET_FIELD(X, 31 - (TO), 31 - (FROM))
#define GET_FIELDs(x,a,b) sign_extend (GET_FIELD(x,a,b), (b) - (a) + 1)
-#define GET_FIELD_SPs(x,a,b) sign_extend (GET_FIELD_SP(x,a,b), 32 - ((b) - (a) + 1))
+#define GET_FIELD_SPs(x,a,b) sign_extend (GET_FIELD_SP(x,a,b), ((b) - (a) + 1))
#ifdef TARGET_SPARC64
#define DFPREG(r) (((r & 1) << 6) | (r & 0x1e))
@@ -2226,7 +2226,7 @@ static void disas_sparc_insn(DisasContext * dc)
gen_movl_reg_T0(rs1);
gen_cond_reg(cond);
if (IS_IMM) { /* immediate */
- rs2 = GET_FIELD_SPs(insn, 0, 10);
+ rs2 = GET_FIELD_SPs(insn, 0, 9);
gen_movl_simm_T1(rs2);
}
else {