aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/bfin/add_shift.S
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-01-05 22:09:57 -0500
committerMike Frysinger <vapier@gentoo.org>2021-01-15 19:18:34 -0500
commit1368b914e93a3af332f787d3d41c106d11bb90da (patch)
tree9893ccae5d2d8cbf2ce855e09d6b8f30b56a21bc /sim/testsuite/bfin/add_shift.S
parente403a898b5893337baea73bcb001ece74042f351 (diff)
downloadbinutils-1368b914e93a3af332f787d3d41c106d11bb90da.zip
binutils-1368b914e93a3af332f787d3d41c106d11bb90da.tar.gz
binutils-1368b914e93a3af332f787d3d41c106d11bb90da.tar.bz2
sim: testsuite: flatten tree
Now that all port tests live under testsuite/sim/*/, and none live in testsuite/ directly, flatten the structure by moving all of the dirs under testsuite/sim/ to testsuite/ directly. We need to stop passing --tool to dejagnu so that it searches all dirs and not just ones that start with "sim". Since we have no other dirs in this tree, and no plans to add any, should be fine.
Diffstat (limited to 'sim/testsuite/bfin/add_shift.S')
-rw-r--r--sim/testsuite/bfin/add_shift.S53
1 files changed, 53 insertions, 0 deletions
diff --git a/sim/testsuite/bfin/add_shift.S b/sim/testsuite/bfin/add_shift.S
new file mode 100644
index 0000000..8a8bf63
--- /dev/null
+++ b/sim/testsuite/bfin/add_shift.S
@@ -0,0 +1,53 @@
+// ACP 5.6 Flags for dreg=(dreg+dreg)<<1,2
+# mach: bfin
+
+#include "test.h"
+.include "testutils.inc"
+ start
+
+
+ r1=0;
+ ASTAT = R1;
+ r2=0;
+ r2.h=0x4000;
+ r2=(r2+r1)<<2;
+ dbga (r2.l,0x0);
+ dbga (r2.h,0x0);
+ _dbg ASTAT;
+ r7=ASTAT;
+ CHECKREG R7, (_VS|_V|_V_COPY|_AZ)
+
+ r2=0;
+ r2.h=0x4000;
+ r2=(r2+r1)<<1;
+ dbga (r2.l,0x0);
+ dbga (r2.h,0x8000);
+ _dbg ASTAT;
+ r7=ASTAT;
+ CHECKREG R7, (_VS|_V|_V_COPY|_AN)
+
+ r1=0;
+ r1.h=0xd300;
+ r2=0;
+ r2.h=0xb700;
+ r2=(r2+r1)<<1;
+ dbga (r2.l,0x0);
+ dbga (r2.h,0x1400);
+ _dbg ASTAT;
+ r7=ASTAT;
+ CHECKREG R7, (_VS|_V|_V_COPY)
+
+ r0 = 1;
+ r0 <<= 31; // r0 should be 0x80000000
+ r7 = 0;
+ ASTAT = r7;
+ _dbg r0;
+ r1 = r0;
+ _dbg r1;
+ r1 = (r1 + r0) << 1; // add overflows to zero, no shift overflow
+ _dbg r1;
+ _dbg ASTAT;
+ r7 = ASTAT;
+ CHECKREG R7, (_VS|_V|_V_COPY|_AZ);
+
+ pass