filename | test/sh4/vmexit.s |
changeset | 808:da414654f3fa |
author | nkeynes |
date | Fri Dec 02 18:18:04 2011 +1000 (12 years ago) |
permissions | -rw-r--r-- |
last change | SH4 shadow-mode tweaks - Fix exceptions generated by the translator to account for the excepting instruction(s) in the cycle counts. - Compare floating point regs bitwise rather than with FP comparisons (otherwise can fail due to nan != nan) - Dump the translated block when we abort with an inconsistency |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/test/sh4/vmexit.s Fri Dec 02 18:18:04 2011 +10001.3 @@ -0,0 +1,70 @@1.4 +.section .text1.5 +.include "sh4/inc.s"1.6 +!1.7 +! Test for correct performance of the continuation-type core exit - that is,1.8 +! the memory write instruction finishes completely, and the following1.9 +! instruction is only executed once. Note that we assume the exit actually1.10 +! takes place, but the mmu tests are unlikely to pass if it doesn't.1.11 +!1.12 +! Reserved:1.13 +! r11 Original value of MMUCR1.14 +! r10 Address of MMUCR1.15 +! r9 Current value of MMUCR1.16 +1.17 +.global _test_vmexit1.18 +_test_vmexit:1.19 + start_test1.20 +1.21 + mov.l r11, @-r151.22 + mov.l r10, @-r151.23 + mov.l r9, @-r151.24 +1.25 + mov.l test_vmexit_mmucr, r101.26 + mov.l @r10, r111.27 + mov r11, r91.28 +1.29 +test_vmexit_1:1.30 + add #1, r121.31 + mov r10, r01.32 + mov r10, r21.33 + mov #1, r11.34 + add #4, r01.35 + xor r1, r91.36 + mov.l r9, @-r01.37 + add #1, r11.38 + cmp/eq r0, r21.39 + bt test_vmexit_1a1.40 + fail test_vmexit_str_k1.41 + bra test_vmexit_21.42 + nop1.43 +test_vmexit_1a:1.44 + mov #2, r01.45 + cmp/eq r1, r01.46 + bt test_vmexit_21.47 + fail test_vmexit_str_k1.48 +1.49 +test_vmexit_2:1.50 + add #1, r121.51 + mov #1, r11.52 + xor r1, r91.53 + bra test_vmexit_2_ok1.54 + mov.l r9, @r101.55 + fail test_vmexit_str_k1.56 + bra test_vmexit_end1.57 + nop1.58 +1.59 +test_vmexit_2_ok:1.60 +1.61 +test_vmexit_end:1.62 + mov.l r11, @r101.63 + mov.l @r15+, r91.64 + mov.l @r15+, r101.65 + mov.l @r15+, r111.66 + end_test test_vmexit_str_k1.67 +1.68 +test_vmexit_mmucr:1.69 + .long 0xFF0000101.70 +test_vmexit_str_k:1.71 + .long test_vmexit_str1.72 +test_vmexit_str:1.73 + .string "VM-EXIT"
.