source: trunk/Softwares/Test/Test_008/src/sys/crt0.s

Last change on this file was 101, checked in by rosiere, 18 years ago

1) Add soc test
2) fix bug (Pc management, Decod and execute, Update prediction ...)

  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1/*
2 * Test_008
3 *
4 * end_ko : infinite_loop
5 * end_ok : Write in R1 the stop address and stop an data
6 * The store in the destination of an jump
7 * start : write an value in special register (epcr), and read this special register
8 */
9
10 .file "crt0.s"
11 /*
12 .section .vector
13 */
14 .section .text
15 .align 4
16
17/* ---[ 0x0 : Print a error ]------------------------------------------- */
18
19 .org 0x0
20_end_ko :
21 l.movhi r1, hi(_tty)
22 l.ori r1, r1, lo(_tty)
23 l.sw 4(r1), r1 /* stop address */
24_infinite_loop :
25 l.j _infinite_loop
26 l.nop
27
28_end_ok :
29 l.movhi r1, hi(_tty)
30 l.ori r1, r1, lo(_tty)
31 l.sw 4(r1), r0 /* stop address */
32
33
34/* ---[ 0x100: RESET exception ]----------------------------------------- */
35 .org 0x100
36 .global _start
37_start:
38 /* r1 : data */
39 l.movhi r1, hi(0xdeadbeef)
40 l.ori r1, r1, lo(0xdeadbeef)
41 /* EPCR <- r1 */
42 l.mtspr r0, r1, 32
43 /* r2 <- EPCR */
44 l.mfspr r2, r0, 32
45 /* test if two register is same */
46 l.sfeq r2, r1
47 l.bnf _end_ko
48 l.nop
49 l.j _end_ok
50 l.nop
51
Note: See TracBrowser for help on using the repository browser.