#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
{
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);
{
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);