filename | test/sh4/vmexit.s |
changeset | 808:da414654f3fa |
author | Nathan Keynes <nkeynes@lxdream.org> |
date | Tue May 10 20:31:14 2011 +1000 (13 years ago) |
permissions | -rw-r--r-- |
last change | Fix SLEEP issue on timeslice border - Don't update slice_cycle if we're already past it in sh4_sleep_run_slice - Make sure we don't re-enter the main run_slice if we're sleeping |
view | annotate | diff | log | raw |
1 .section .text
2 .include "sh4/inc.s"
3 !
4 ! Test for correct performance of the continuation-type core exit - that is,
5 ! the memory write instruction finishes completely, and the following
6 ! instruction is only executed once. Note that we assume the exit actually
7 ! takes place, but the mmu tests are unlikely to pass if it doesn't.
8 !
9 ! Reserved:
10 ! r11 Original value of MMUCR
11 ! r10 Address of MMUCR
12 ! r9 Current value of MMUCR
14 .global _test_vmexit
15 _test_vmexit:
16 start_test
18 mov.l r11, @-r15
19 mov.l r10, @-r15
20 mov.l r9, @-r15
22 mov.l test_vmexit_mmucr, r10
23 mov.l @r10, r11
24 mov r11, r9
26 test_vmexit_1:
27 add #1, r12
28 mov r10, r0
29 mov r10, r2
30 mov #1, r1
31 add #4, r0
32 xor r1, r9
33 mov.l r9, @-r0
34 add #1, r1
35 cmp/eq r0, r2
36 bt test_vmexit_1a
37 fail test_vmexit_str_k
38 bra test_vmexit_2
39 nop
40 test_vmexit_1a:
41 mov #2, r0
42 cmp/eq r1, r0
43 bt test_vmexit_2
44 fail test_vmexit_str_k
46 test_vmexit_2:
47 add #1, r12
48 mov #1, r1
49 xor r1, r9
50 bra test_vmexit_2_ok
51 mov.l r9, @r10
52 fail test_vmexit_str_k
53 bra test_vmexit_end
54 nop
56 test_vmexit_2_ok:
58 test_vmexit_end:
59 mov.l r11, @r10
60 mov.l @r15+, r9
61 mov.l @r15+, r10
62 mov.l @r15+, r11
63 end_test test_vmexit_str_k
65 test_vmexit_mmucr:
66 .long 0xFF000010
67 test_vmexit_str_k:
68 .long test_vmexit_str
69 test_vmexit_str:
70 .string "VM-EXIT"
.