source: trunk/Softwares/Test/Test_017/src/sys/crt0.s @ 100

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

1) Bug fix (Operation, Instruction)
2) Modif Return Address Stack
3) Add Soft Test
4) Add Soc Test

  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1/*
2 * Test_017
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.cmov
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_infinite_loop :       
22        l.j     _infinite_loop
23        l.nop
24
25_end_ok :
26        l.movhi r1,     hi(_tty)
27        l.ori   r1, r1, lo(_tty)
28        l.sw    4(r1), r1 /* stop address */
29
30
31/* ---[ 0x100: RESET exception ]----------------------------------------- */
32        .org 0x100
33        .global _start
34_start:
35
36        l.movhi r1,     hi(0xdeadbeef) /* RA */
37        l.ori   r1, r1, lo(0xdeadbeef)
38        l.movhi r2,     hi(0x87654321) /* RB */
39        l.ori   r2, r2, lo(0x87654321)
40
41        /**********/
42        /* Test 1 */
43        /**********/
44
45        l.sfeq  r0, r0
46        l.cmov  r3, r1, r2
47
48        /* Test result */
49        l.sfeq  r3, r1
50        l.bnf   _end_ko
51        l.nop
52
53        /**********/
54        /* Test 2 */
55        /**********/
56
57        l.sfne  r0, r0
58        l.cmov  r3, r1, r2
59
60        /* Test result */
61        l.sfeq  r3, r2
62        l.bnf   _end_ko
63        l.nop
64       
65        /**********/
66        /* End */
67        /**********/
68
69        l.j     _end_ok
70        l.nop
Note: See TracBrowser for help on using the repository browser.