diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-03 17:46:29 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-03 17:46:29 +0000 |
commit | 0387d928754f08574a18ff72104d669d91dcc2f8 (patch) | |
tree | 894e7df49bd459f0edde9f774d1aaa899f80b9bf | |
parent | fe33cc710327455a55bd4f44bc7aa69661cc7878 (diff) |
Fix Sparc64 ldfa/stfa and float ops with fpr >= 32
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3318 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | target-sparc/translate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 94503bee8a..1a6d56ac40 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -87,7 +87,7 @@ enum { #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)) +#define DFPREG(r) (((r & 1) << 5) | (r & 0x1e)) #else #define DFPREG(r) (r & 0x1e) #endif @@ -431,7 +431,7 @@ static inline void gen_ldf_asi(int insn, int size) { int asi, offset, rd; - rd = GET_FIELD(insn, 2, 6); + rd = DFPREG(GET_FIELD(insn, 2, 6)); if (IS_IMM) { offset = GET_FIELD(insn, 25, 31); gen_op_ldf_asi_reg(offset, size, rd); @@ -445,7 +445,7 @@ static inline void gen_stf_asi(int insn, int size) { int asi, offset, rd; - rd = GET_FIELD(insn, 2, 6); + rd = DFPREG(GET_FIELD(insn, 2, 6)); if (IS_IMM) { offset = GET_FIELD(insn, 25, 31); gen_op_stf_asi_reg(offset, size, rd); |