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

Last change on this file was 112, checked in by rosiere, 15 years ago

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1/*
2 * Test_015
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  : Test l.bf
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
39        l.movhi r2,     hi(0x00000010) /* count max */
40        l.ori   r2, r2, lo(0x00000100)
41       
42        /**********/
43        /* Test 1 */
44        /**********/
45       
46        l.movhi r1,     hi(0x00000000) /* RA */
47        l.ori   r1, r1, lo(0x00000000)
48       
49        /* Test result */
50_test_1_loop :
51        l.sfne  r1, r2
52        l.bf    _test_1_loop
53        l.addi  r1, r1, 1
54_test_1_end :
55
56        /**********/
57        /* Test 2 */
58        /**********/
59       
60        l.movhi r1,     hi(0x00000000) /* RA */
61        l.ori   r1, r1, lo(0x00000000)
62       
63        /* Test result */
64_test_2_loop :
65        l.sfeq  r1, r2
66        l.bf    _test_2_end
67        l.addi  r1, r1, 1
68        l.j     _test_2_loop
69        l.nop   
70_test_2_end :
71       
72       
73        /**********/
74        /* End */
75        /**********/
76
77        l.j     _end_ok
78        l.nop
Note: See TracBrowser for help on using the repository browser.