Search
lxdream.org :: lxdream/test/sh4/vmexit.s :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/vmexit.s
changeset 808:da414654f3fa
author nkeynes
date Sat Aug 09 09:13:29 2008 +0000 (15 years ago)
permissions -rw-r--r--
last change Add failing test case for the MMU flush-cache case
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/sh4/vmexit.s Sat Aug 09 09:13:29 2008 +0000
1.3 @@ -0,0 +1,70 @@
1.4 +.section .text
1.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 following
1.9 +! instruction is only executed once. Note that we assume the exit actually
1.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 MMUCR
1.14 +! r10 Address of MMUCR
1.15 +! r9 Current value of MMUCR
1.16 +
1.17 +.global _test_vmexit
1.18 +_test_vmexit:
1.19 + start_test
1.20 +
1.21 + mov.l r11, @-r15
1.22 + mov.l r10, @-r15
1.23 + mov.l r9, @-r15
1.24 +
1.25 + mov.l test_vmexit_mmucr, r10
1.26 + mov.l @r10, r11
1.27 + mov r11, r9
1.28 +
1.29 +test_vmexit_1:
1.30 + add #1, r12
1.31 + mov r10, r0
1.32 + mov r10, r2
1.33 + mov #1, r1
1.34 + add #4, r0
1.35 + xor r1, r9
1.36 + mov.l r9, @-r0
1.37 + add #1, r1
1.38 + cmp/eq r0, r2
1.39 + bt test_vmexit_1a
1.40 + fail test_vmexit_str_k
1.41 + bra test_vmexit_2
1.42 + nop
1.43 +test_vmexit_1a:
1.44 + mov #2, r0
1.45 + cmp/eq r1, r0
1.46 + bt test_vmexit_2
1.47 + fail test_vmexit_str_k
1.48 +
1.49 +test_vmexit_2:
1.50 + add #1, r12
1.51 + mov #1, r1
1.52 + xor r1, r9
1.53 + bra test_vmexit_2_ok
1.54 + mov.l r9, @r10
1.55 + fail test_vmexit_str_k
1.56 + bra test_vmexit_end
1.57 + nop
1.58 +
1.59 +test_vmexit_2_ok:
1.60 +
1.61 +test_vmexit_end:
1.62 + mov.l r11, @r10
1.63 + mov.l @r15+, r9
1.64 + mov.l @r15+, r10
1.65 + mov.l @r15+, r11
1.66 + end_test test_vmexit_str_k
1.67 +
1.68 +test_vmexit_mmucr:
1.69 + .long 0xFF000010
1.70 +test_vmexit_str_k:
1.71 + .long test_vmexit_str
1.72 +test_vmexit_str:
1.73 + .string "VM-EXIT"
.