Search
lxdream.org :: lxdream/test/sh4/trapa.s :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/trapa.s
changeset 533:9764673fd4a5
author nkeynes
date Thu Dec 23 17:50:10 2010 +1000 (13 years ago)
permissions -rw-r--r--
last change Clone iso_memory_stream_new() as iso_mem_stream_new(), since current
versions of libisofs have made it unlinkable on linux
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/sh4/trapa.s Thu Dec 23 17:50:10 2010 +1000
1.3 @@ -0,0 +1,36 @@
1.4 +.section .text
1.5 +.include "sh4/inc.s"
1.6 +
1.7 +.global _test_trapa
1.8 +_test_trapa:
1.9 + start_test
1.10 +
1.11 +test_trapa_1:
1.12 + add #1, r12
1.13 + expect_exc 0x00000160
1.14 + trapa #42
1.15 +
1.16 +test_trapa_1_pc:
1.17 + assert_exc_caught test_trapa_str_k test_trapa_1_pc
1.18 +
1.19 + mov.l test_trapa_tra, r1
1.20 + mov.l @r1, r2
1.21 + mov #42, r0
1.22 + shll r0
1.23 + shll r0
1.24 + cmp/eq r0, r2
1.25 + bt test_trapa_end
1.26 + fail test_trapa_str_k
1.27 + bra test_trapa_end
1.28 + nop
1.29 +
1.30 +test_trapa_tra:
1.31 + .long 0xFF000020
1.32 +
1.33 +test_trapa_end:
1.34 + end_test test_trapa_str_k
1.35 +
1.36 +test_trapa_str_k:
1.37 + .long test_trapa_str
1.38 +test_trapa_str:
1.39 + .string "TRAPA"
.