summaryrefslogtreecommitdiff
path: root/sim/testsuite/sim/fr30/dmovb.cgs
diff options
context:
space:
mode:
Diffstat (limited to 'sim/testsuite/sim/fr30/dmovb.cgs')
-rw-r--r--sim/testsuite/sim/fr30/dmovb.cgs46
1 files changed, 46 insertions, 0 deletions
diff --git a/sim/testsuite/sim/fr30/dmovb.cgs b/sim/testsuite/sim/fr30/dmovb.cgs
new file mode 100644
index 00000000000..96cfb9d3e08
--- /dev/null
+++ b/sim/testsuite/sim/fr30/dmovb.cgs
@@ -0,0 +1,46 @@
+# fr30 testcase for dmovb
+# mach(): fr30
+
+ .include "testutils.inc"
+ START
+
+ .text
+ .global dmovb
+dmovb:
+ ; Test dmovb @$dir8,$R13
+ mvi_h_gr 0xdeadbeef,r1
+ mvi_h_gr 0x80,r2
+ mvr_h_mem r1,r2
+ set_cc 0x0f ; Condition codes shouldn't change
+ dmovb @0x80,r13
+ test_cc 1 1 1 1
+ test_h_gr 0xffffffde,r13
+
+ ; Test dmovb $R13,@$dir8
+ mvi_h_gr 0xbeefdead,r13
+ set_cc 0x0e ; Condition codes shouldn't change
+ dmovb r13,@0x80
+ test_cc 1 1 1 0
+ test_h_mem 0xadadbeef,r2
+
+ ; Test dmovb @$dir8,@R13+
+ mvi_h_gr 0x7c,r13
+ mvi_h_mem 0xdeadbeef,r13
+ set_cc 0x0d ; Condition codes shouldn't change
+ dmovb @0x7f,@r13+
+ test_cc 1 1 0 1
+ mvi_h_gr 0x7c,r2
+ test_h_mem 0xefadbeef,r2
+ test_h_gr 0x7d,r13
+
+ ; Test dmovb @$R13+,@$dir8
+ mvi_h_gr 0x7c,r13
+ mvi_h_mem 0xbeefdead,r13
+ set_cc 0x0c ; Condition codes shouldn't change
+ dmovb @r13+,@0x7f
+ test_cc 1 1 0 0
+ mvi_h_gr 0x7c,r2
+ test_h_mem 0xbeefdebe,r2
+ test_h_gr 0x7d,r13
+
+ pass