revision 808:da414654f3fa
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 808:da414654f3fa |
parent | 807:1ca418e6ed5d |
child | 809:8bdbf4d95da4 |
author | nkeynes |
date | Sat Aug 09 09:13:29 2008 +0000 (13 years ago) |
Add failing test case for the MMU flush-cache case
![]() | test/Makefile.in | view | annotate | diff | log | |
![]() | test/sh4/testsh4.c | view | annotate | diff | log | |
![]() | test/sh4/vmexit.s | view | annotate | diff | log |
1.1 --- a/test/Makefile.in Sat Aug 09 07:39:47 2008 +00001.2 +++ b/test/Makefile.in Sat Aug 09 09:13:29 2008 +00001.3 @@ -79,7 +79,7 @@1.4 sh4/mac.so \1.5 sh4/rot.so sh4/shl.so sh4/shld.so sh4/sub.so sh4/subc.so \1.6 sh4/trapa.so sh4/tas.so sh4/xtrct.so \1.7 - sh4/excslot.so sh4/undef.so sh4/tlb.so1.8 + sh4/excslot.so sh4/undef.so sh4/tlb.so sh4/vmexit.so1.9 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)1.10 $(SH4OBJCOPY) testsh4 testsh4.bin1.12 @@ -157,7 +157,7 @@1.13 sh4/addv.s sh4/and.s sh4/andi.s sh4/bf.s sh4/bsr.s sh4/bt.s sh4/cmp.s \1.14 sh4/cmpstr.s sh4/div0.s sh4/div1.s sh4/excslot.s sh4/float.s sh4/fmov.s \1.15 sh4/ftrc.s sh4/inc.s sh4/mac.s sh4/rot.s sh4/shl.s sh4/shld.s sh4/sub.s \1.16 - sh4/subc.s sh4/tas.s sh4/testsh4.c sh4/tlb.s sh4/trapa.s sh4/undef.s \1.17 + sh4/subc.s sh4/tas.s sh4/testsh4.c sh4/tlb.s sh4/vmexit.s sh4/trapa.s sh4/undef.s \1.18 sh4/xtrct.s testdata.c testdata.h testdisp.c testide.c testmath.c \1.19 testmmu.c testregs.c testrend.c testspu.c testta.c testyuv.c timer.c timer.h \1.20 testta.data testta2.data testta3.data testta4.data testta5.data testsort.data \
2.1 --- a/test/sh4/testsh4.c Sat Aug 09 07:39:47 2008 +00002.2 +++ b/test/sh4/testsh4.c Sat Aug 09 09:13:29 2008 +00002.3 @@ -102,6 +102,7 @@2.4 test_slot_illegal();2.5 test_undefined();2.6 test_tlb();2.7 + test_vmexit();2.8 remove_interrupt_handler();2.10 fprintf( stdout, "Total: %d/%d tests passed (%d%%)\n", total_tests-total_fails,
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00003.2 +++ b/test/sh4/vmexit.s Sat Aug 09 09:13:29 2008 +00003.3 @@ -0,0 +1,70 @@3.4 +.section .text3.5 +.include "sh4/inc.s"3.6 +!3.7 +! Test for correct performance of the continuation-type core exit - that is,3.8 +! the memory write instruction finishes completely, and the following3.9 +! instruction is only executed once. Note that we assume the exit actually3.10 +! takes place, but the mmu tests are unlikely to pass if it doesn't.3.11 +!3.12 +! Reserved:3.13 +! r11 Original value of MMUCR3.14 +! r10 Address of MMUCR3.15 +! r9 Current value of MMUCR3.16 +3.17 +.global _test_vmexit3.18 +_test_vmexit:3.19 + start_test3.20 +3.21 + mov.l r11, @-r153.22 + mov.l r10, @-r153.23 + mov.l r9, @-r153.24 +3.25 + mov.l test_vmexit_mmucr, r103.26 + mov.l @r10, r113.27 + mov r11, r93.28 +3.29 +test_vmexit_1:3.30 + add #1, r123.31 + mov r10, r03.32 + mov r10, r23.33 + mov #1, r13.34 + add #4, r03.35 + xor r1, r93.36 + mov.l r9, @-r03.37 + add #1, r13.38 + cmp/eq r0, r23.39 + bt test_vmexit_1a3.40 + fail test_vmexit_str_k3.41 + bra test_vmexit_23.42 + nop3.43 +test_vmexit_1a:3.44 + mov #2, r03.45 + cmp/eq r1, r03.46 + bt test_vmexit_23.47 + fail test_vmexit_str_k3.48 +3.49 +test_vmexit_2:3.50 + add #1, r123.51 + mov #1, r13.52 + xor r1, r93.53 + bra test_vmexit_2_ok3.54 + mov.l r9, @r103.55 + fail test_vmexit_str_k3.56 + bra test_vmexit_end3.57 + nop3.58 +3.59 +test_vmexit_2_ok:3.60 +3.61 +test_vmexit_end:3.62 + mov.l r11, @r103.63 + mov.l @r15+, r93.64 + mov.l @r15+, r103.65 + mov.l @r15+, r113.66 + end_test test_vmexit_str_k3.67 +3.68 +test_vmexit_mmucr:3.69 + .long 0xFF0000103.70 +test_vmexit_str_k:3.71 + .long test_vmexit_str3.72 +test_vmexit_str:3.73 + .string "VM-EXIT"
.