If we're shifting accumulators, we don't want to touch the V bit in
ASTAT, so add size checks to the ashiftrt/lshiftrt helpers.
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+2011-06-18 Robin Getz <robin.getz@analog.com>
+
+ * bfin-sim.c (ashiftrt): If size is 40, do not call SET_ASTATREG.
+ (lshiftrt): Likewise.
+
2011-06-18 Robin Getz <robin.getz@analog.com>
* bfin-sim.c (decode_dsp32shift_0): Use get_unextended_acc
val |= sgn;
SET_ASTATREG (an, val >> (size - 1));
SET_ASTATREG (az, val == 0);
- /* XXX: Need to check ASTAT[v] behavior here. */
- SET_ASTATREG (v, 0);
+ if (size != 40)
+ SET_ASTATREG (v, 0);
return val;
}
}
SET_ASTATREG (an, val >> (size - 1));
SET_ASTATREG (az, val == 0);
- SET_ASTATREG (v, 0);
+ if (size != 40)
+ SET_ASTATREG (v, 0);
return val;
}