Added 3 miscellaneous testcases like read32.ms uread16.ms hw-trap.ms.
This commit is contained in:
parent
9c301be69b
commit
e8db345894
sim/testsuite/sim/cr16
10
sim/testsuite/sim/cr16/hw-trap.ms
Normal file
10
sim/testsuite/sim/cr16/hw-trap.ms
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# mach(): cr16
|
||||||
|
|
||||||
|
.include "testutils.inc"
|
||||||
|
|
||||||
|
start
|
||||||
|
|
||||||
|
# perform trap
|
||||||
|
movw $0,r2
|
||||||
|
movw $0x410,r0
|
||||||
|
pass # the pass macro use the trap 8
|
17
sim/testsuite/sim/cr16/uread16.ms
Normal file
17
sim/testsuite/sim/cr16/uread16.ms
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# mach: cr16
|
||||||
|
|
||||||
|
.include "testutils.inc"
|
||||||
|
|
||||||
|
start
|
||||||
|
|
||||||
|
.global read16
|
||||||
|
read16:
|
||||||
|
loadw foo,r1
|
||||||
|
cmpw $42, r1
|
||||||
|
beq ok
|
||||||
|
fail
|
||||||
|
ok:
|
||||||
|
pass
|
||||||
|
|
||||||
|
foo:
|
||||||
|
.word 42
|
17
sim/testsuite/sim/cr16/uread32.ms
Normal file
17
sim/testsuite/sim/cr16/uread32.ms
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# mach: cr16
|
||||||
|
|
||||||
|
.include "testutils.inc"
|
||||||
|
|
||||||
|
start
|
||||||
|
|
||||||
|
.global read32
|
||||||
|
read32:
|
||||||
|
loadd foo, (r1,r0)
|
||||||
|
cmpd $0x12345678, (r1,r0)
|
||||||
|
beq ok
|
||||||
|
fail
|
||||||
|
ok:
|
||||||
|
pass
|
||||||
|
|
||||||
|
foo:
|
||||||
|
.long 0x12345678
|
Loading…
x
Reference in New Issue
Block a user