+2015-10-11 Mike Frysinger <vapier@gentoo.org>
+
+ PR sim/18407
+ * bfin-sim.c (decode_dsp32shiftimm_0): Call ashiftrt when count
+ is less than 0.
+
2015-06-24 Mike Frysinger <vapier@gentoo.org>
* interp.c (trace_register): Delete.
int count = imm6 (immag);
TRACE_INSN (cpu, "R%i = R%i << %i (S);", dst0, src1, count);
- STORE (DREG (dst0), lshift (cpu, DREG (src1), count, 32, 1, 1));
+
+ if (count < 0)
+ STORE (DREG (dst0), ashiftrt (cpu, DREG (src1), -count, 32));
+ else
+ STORE (DREG (dst0), lshift (cpu, DREG (src1), count, 32, 1, 1));
}
else if (sop == 2 && sopcde == 2)
{
+2015-10-11 Mike Frysinger <vapier@gentoo.org>
+
+ PR sim/18407
+ * ashift_left.s: New test.
+
2013-12-07 Mike Frysinger <vapier@gentoo.org>
* run-tests.sh: Add +x file mode.
--- /dev/null
+# Blackfin testcase for left ashift
+# Dreg = Dreg << imm (S);
+# mach: bfin
+
+ .include "testutils.inc"
+
+ .macro test in:req, shift:req, out:req, opt
+ imm32 r0, \in;
+ r1 = r0 >>> \shift \opt;
+ CHECKREG r1, \out;
+ .endm
+
+ start
+
+test 2, 1, 1, (S);
+
+ pass