aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-10-11 03:32:11 -0400
committerMike Frysinger <vapier@gentoo.org>2015-10-11 03:42:09 -0400
commit3f946aa82518e878aea2cba4b6a9bcc651412c5c (patch)
treefa0d5180ab294f40a2cd5ceef6458b1b783b12ea /sim/testsuite
parent5fde150fede436dd250706d3fb1786c590e04b26 (diff)
downloadgdb-3f946aa82518e878aea2cba4b6a9bcc651412c5c.zip
gdb-3f946aa82518e878aea2cba4b6a9bcc651412c5c.tar.gz
gdb-3f946aa82518e878aea2cba4b6a9bcc651412c5c.tar.bz2
sim: bfin: handle negative left saturated shifts as ashifts [BZ #18407]
When handling left saturated ashifts with negative immediates, they should be treated as right ashifts. This matches hardware behavior. Reported-by: Igor Rayak <igorr@gitatechnologies.com>
Diffstat (limited to 'sim/testsuite')
-rw-r--r--sim/testsuite/sim/bfin/ChangeLog5
-rw-r--r--sim/testsuite/sim/bfin/ashift_left.s17
2 files changed, 22 insertions, 0 deletions
diff --git a/sim/testsuite/sim/bfin/ChangeLog b/sim/testsuite/sim/bfin/ChangeLog
index 89d2833..4fc604f 100644
--- a/sim/testsuite/sim/bfin/ChangeLog
+++ b/sim/testsuite/sim/bfin/ChangeLog
@@ -1,3 +1,8 @@
+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.
diff --git a/sim/testsuite/sim/bfin/ashift_left.s b/sim/testsuite/sim/bfin/ashift_left.s
new file mode 100644
index 0000000..04cfa40
--- /dev/null
+++ b/sim/testsuite/sim/bfin/ashift_left.s
@@ -0,0 +1,17 @@
+# 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