summaryrefslogtreecommitdiff
path: root/sim/testsuite/cr16/cmpw.cgs
diff options
context:
space:
mode:
Diffstat (limited to 'sim/testsuite/cr16/cmpw.cgs')
-rw-r--r--sim/testsuite/cr16/cmpw.cgs23
1 files changed, 23 insertions, 0 deletions
diff --git a/sim/testsuite/cr16/cmpw.cgs b/sim/testsuite/cr16/cmpw.cgs
new file mode 100644
index 00000000000..9d333fb86b2
--- /dev/null
+++ b/sim/testsuite/cr16/cmpw.cgs
@@ -0,0 +1,23 @@
+# cr16 testcase for cmp $imm, reg
+# mach(): cr16
+
+ .include "testutils.inc"
+
+ start
+
+ .global cmp
+cmp:
+ mvi_h_condbit 0
+ movw $0x1234, r4
+ movw $0x1234, r5
+ cmpb r4,r5
+ beq ok
+not_ok:
+ fail
+ok:
+ mvi_h_condbit 1
+ movw $0x2222, r5
+ cmpw r4,r5
+ beq not_ok
+
+ pass