aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/cr16/pop2.cgs
diff options
context:
space:
mode:
Diffstat (limited to 'sim/testsuite/cr16/pop2.cgs')
-rw-r--r--sim/testsuite/cr16/pop2.cgs35
1 files changed, 35 insertions, 0 deletions
diff --git a/sim/testsuite/cr16/pop2.cgs b/sim/testsuite/cr16/pop2.cgs
new file mode 100644
index 0000000..aa3a9ec
--- /dev/null
+++ b/sim/testsuite/cr16/pop2.cgs
@@ -0,0 +1,35 @@
+# cr16 testcase for pop count reg insns.
+# mach: cr16
+
+ .include "testutils.inc"
+
+ start
+
+ .global pop2
+pop2:
+ movd $0x1000, (sp)
+ movw $0x2f50, r3
+ storw r3, 0x1000
+ movw $0x107e, r3
+ storw r3, 0x1002
+ movw $0x35ec, r3
+ storw r3, 0x1004
+
+ pop $3,r5
+
+ cmpw $0x2f50,r5
+ beq ok1
+ br not_ok
+not_ok:
+ fail
+ok1:
+ cmpw $0x107e,r6
+ beq ok2
+ br not_ok
+ok2:
+ cmpw $0x35ec,r7
+ beq ok3
+ br not_ok
+
+ok3:
+ pass