filename | test/sh4/excslot.s |
changeset | 233:f8333b94f503 |
prev | 231:a9e61a96a885 |
next | 357:3592a10b3242 |
author | nkeynes |
date | Wed Sep 27 10:21:34 2006 +0000 (17 years ago) |
permissions | -rw-r--r-- |
last change | Add user mode/system mode switch Add undefined instruction tests |
file | annotate | diff | log | raw |
1.1 --- a/test/sh4/excslot.s Tue Sep 26 11:05:38 2006 +00001.2 +++ b/test/sh4/excslot.s Wed Sep 27 10:21:34 2006 +00001.3 @@ -31,10 +31,6 @@1.4 bsr test_slot_fail1.5 jsr @r31.6 assert_exc_caught test_slot_str_k1 test_slot_2_pc1.7 - bra test_slot_31.8 - nop1.9 -test_slot_str_k1:1.10 - .long test_slot_str1.12 test_slot_3: ! BRA1.13 add #1, r121.14 @@ -42,7 +38,7 @@1.15 test_slot_3_pc:1.16 bsr test_slot_fail1.17 bra test_slot_fail1.18 - assert_exc_caught test_slot_str_k test_slot_3_pc1.19 + assert_exc_caught test_slot_str_k1 test_slot_3_pc1.21 test_slot_4: ! BRAF1.22 add #1, r121.23 @@ -103,7 +99,12 @@1.24 bt/s test_slot_10_fail1.25 test_slot_10_fail:1.26 assert_exc_caught test_slot_str_k test_slot_10_pc1.27 + bra test_slot_111.28 + nop1.29 +test_slot_str_k1:1.30 + .long test_slot_str1.32 +1.33 test_slot_11: ! TRAPA1.34 add #1, r121.35 expect_exc 0x000001A01.36 @@ -171,8 +172,19 @@1.37 !1.38 ! Ok now the privilege tests. These should raise SLOT_ILLEGAL when executed1.39 ! in a delay slot (otherwise it's GENERAL_ILLEGAL)1.40 -! TODO: need mode-switch code1.41 +1.42 +test_slot_18: ! LDC Rn, SPC in user mode1.43 + add #1, r121.44 + expect_exc 0x000001A01.45 + stc spc, r41.46 + usermode1.47 +test_slot_18_pc:1.48 + bsr test_slot_fail1.49 + ldc r4, spc1.50 + systemmode1.51 + assert_exc_caught test_slot_str_k test_slot_18_pc1.53 +1.54 test_slot_end:1.55 end_test test_slot_str_k
.