1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/sh4/undef.s Sat Jan 06 04:08:11 2007 +0000
1.5 +.include "sh4/inc.s"
1.7 +! Test for undefined/unknown instructions. The only "official"
1.8 +! undefined instruction is 0xFFFD, but this tests everything
1.9 +! that doesn't match a known instruction pattern. Undefined
1.10 +! instructions are expected to raise general-illegal when not
1.11 +! in a delay slot, and slot-illegal when in a delay slot.
1.13 +.global _test_undefined
1.17 +test_undef_1: ! First the official one
1.19 + expect_exc 0x00000180
1.22 + assert_exc_caught test_undef_str_k test_undef_1_pc
1.24 +! Gaps in the STC range (0x0nn2)
1.25 +test_undef_2: ! 0x52
1.27 + expect_exc 0x00000180
1.30 + assert_exc_caught test_undef_str_k test_undef_2_pc
1.32 +test_undef_3: ! 0x62
1.34 + expect_exc 0x00000180
1.37 + assert_exc_caught test_undef_str_k test_undef_3_pc
1.39 +test_undef_4: ! 0x72
1.41 + expect_exc 0x00000180
1.44 + assert_exc_caught test_undef_str_k test_undef_4_pc
1.46 +! Test undefined FP instructions w/ and w/o FP disable
1.49 + expect_exc 0x00000180
1.50 +test_undef_fpu_1_pc:
1.52 + assert_exc_caught test_undef_str_k test_undef_fpu_1_pc
1.55 + end_test test_undef_str_k
1.58 + .long test_undef_str
1.60 + .string "UNDEFINED-INSTRUCTION"