Last change
on this file since 604 was
520,
checked in by bouyer, 11 years ago
|
Re-add the tests; reverting previous which was done at the wrong level (sorry)
|
File size:
966 bytes
|
Line | |
---|
1 | /* |
---|
2 | * coproc unusable exception test: we take an exception on COP1 use |
---|
3 | */ |
---|
4 | #include <registers.h> |
---|
5 | #include <misc.h> |
---|
6 | |
---|
7 | .text |
---|
8 | .globl _start |
---|
9 | _start: |
---|
10 | .set noreorder |
---|
11 | la k0, TTY_BASE |
---|
12 | la k1, EXIT_BASE |
---|
13 | la sp, 0x00400000 - 16 |
---|
14 | |
---|
15 | PRINT(startstr) |
---|
16 | |
---|
17 | /* reset cop0 status (keep BEV) */ |
---|
18 | lui a0, 0x0040; |
---|
19 | mtc0 a0, COP0_STATUS |
---|
20 | li t3, MAGIC1 |
---|
21 | mtc1 t3,$f2 |
---|
22 | mfc1 a0,$f2 |
---|
23 | PRINTX |
---|
24 | PUTCHAR('\n') |
---|
25 | nop |
---|
26 | nop |
---|
27 | nop |
---|
28 | nop |
---|
29 | |
---|
30 | 1: |
---|
31 | /* we should not get there */ |
---|
32 | EXIT(1) |
---|
33 | |
---|
34 | .globl excep |
---|
35 | excep: |
---|
36 | .set noreorder |
---|
37 | PRINT(statusstr) |
---|
38 | mfc0 a0, COP0_STATUS |
---|
39 | PRINTX |
---|
40 | |
---|
41 | PRINT(causestr) |
---|
42 | mfc0 a0, COP0_CAUSE |
---|
43 | PRINTX |
---|
44 | |
---|
45 | PRINT(pcstr) |
---|
46 | mfc0 a0, COP0_EXPC |
---|
47 | PRINTX |
---|
48 | |
---|
49 | PRINT(badvastr) |
---|
50 | mfc0 a0, COP_0_BADVADDR |
---|
51 | PRINTX |
---|
52 | PUTCHAR('\n') |
---|
53 | |
---|
54 | EXIT(0) |
---|
55 | |
---|
56 | .rodata: |
---|
57 | statusstr: .ascii "status \0" |
---|
58 | causestr: .ascii " cause \0" |
---|
59 | pcstr: .ascii " pc \0" |
---|
60 | badvastr: .ascii " badva \0" |
---|
61 | startstr: .ascii "start\n\0" |
---|
62 | |
---|
63 | .org EXCEP_ADDRESS - BOOT_ADDRESS |
---|
64 | .globl evect |
---|
65 | evect: |
---|
66 | j excep |
---|
67 | nop |
---|
68 | .data |
---|
69 | .word MAGIC1 |
---|
70 | testval: |
---|
71 | .word MAGIC2 |
---|
Note: See
TracBrowser
for help on using the repository browser.