source: trunk/softs/tests_ccvcache_v4/test_ri/test.S @ 271

Last change on this file since 271 was 232, checked in by alain, 13 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: 959 bytes
Line 
1/*
2 * reserved instruction exception test: check that a reserved instruction
3 * generates an exception.
4 */
5#include <registers.h>
6#include <misc.h>
7
8        .text
9        .globl  _start
10_start:
11        .set noreorder
12        la      k0, TTY_BASE
13        la      k1, EXIT_BASE
14        la      sp, 0x00400000 - 16
15
16        PRINT(startstr)
17
18        /* reset cop0 status (keep BEV) */
19        lui     a0, 0x0040;
20        mtc0    a0, COP0_STATUS
21        nop
22        nop
23        nop
24        .word 0x60000000
25        EXIT(2)
26
27        .globl excep
28excep:
29        .set noreorder
30        PRINT(statusstr)
31        mfc0    a0, COP0_STATUS
32        PRINTX
33
34        PRINT(causestr)
35        mfc0    a0, COP0_CAUSE
36        PRINTX
37
38        PRINT(pcstr)
39        mfc0    a0, COP0_EXPC
40        PRINTX
41
42        PRINT(badvastr)
43        mfc0    a0, COP_0_BADVADDR
44        PRINTX
45        PUTCHAR('\n')
46#we should end there
47        EXIT(0)
48
49        .rodata:
50statusstr: .ascii "status \0"
51causestr: .ascii " cause \0"
52pcstr: .ascii " pc \0"
53badvastr: .ascii " badva \0"
54startstr: .ascii "start\n\0"
55usrstr: .ascii "usrmode\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.