source: trunk/softs/tests_cc_vcache/test_excep_cop/test.S @ 508

Last change on this file since 508 was 232, checked in by alain, 12 years ago

Introducing the elementary tests for a TSAR mono-cluster
mono-processor platform with MMU using the vci_cc_vcache_v4
such as the "tsarv4_mono_mmu".
(assemby level tests written by Manuel Bouyer)

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
301:
31        /* we should not get there */
32        EXIT(1)
33
34        .globl excep
35excep:
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:
57statusstr: .ascii "status \0"
58causestr: .ascii " cause \0"
59pcstr: .ascii " pc \0"
60badvastr: .ascii " badva \0"
61startstr: .ascii "start\n\0"
62
63        .org EXCEP_ADDRESS - BOOT_ADDRESS
64        .globl evect
65evect:
66        j       excep
67        nop
68        .data
69        .word MAGIC1
70testval:
71        .word MAGIC2
Note: See TracBrowser for help on using the repository browser.