source: trunk/softs/tests_cc_vcache/test_excep_cop_delayslot/test.S @ 520

Last change on this file since 520 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: 913 bytes
Line 
1/*
2 * coproc unusable exception test: 0x80000000 bit is set in cause register
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        j       1f
21        mtc1    t3,$f2
22        nop
23
241:
25        /* we should not get there */
26        EXIT(1)
27
28        .globl excep
29excep:
30        .set noreorder
31        PRINT(statusstr)
32        mfc0    a0, COP0_STATUS
33        PRINTX
34
35        PRINT(causestr)
36        mfc0    a0, COP0_CAUSE
37        PRINTX
38
39        PRINT(pcstr)
40        mfc0    a0, COP0_EXPC
41        PRINTX
42
43        PRINT(badvastr)
44        mfc0    a0, COP_0_BADVADDR
45        PRINTX
46        PUTCHAR('\n')
47
48        EXIT(0)
49
50        .rodata:
51statusstr: .ascii "status \0"
52causestr: .ascii " cause \0"
53pcstr: .ascii " pc \0"
54badvastr: .ascii " badva \0"
55startstr: .ascii "start\n\0"
56
57        .org EXCEP_ADDRESS - BOOT_ADDRESS
58        .globl evect
59evect:
60        j       excep
61        nop
62        .data
63        .word MAGIC1
64testval:
65        .word MAGIC2
Note: See TracBrowser for help on using the repository browser.