Last change
on this file since 140 was
102,
checked in by rosiere, 16 years ago
|
Previous commit with new files :P
|
-
Property svn:keywords set to
Id
|
File size:
4.4 KB
|
Line | |
---|
1 | /* |
---|
2 | * Test_026 |
---|
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.sw / l.lws (l.lwz) |
---|
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 | l.movhi r1, hi(_stack) /* address */ |
---|
39 | l.ori r1, r1, lo(_stack) |
---|
40 | |
---|
41 | l.movhi r2, hi(0xdeadbeef) /* data */ |
---|
42 | l.ori r2, r2, lo(0xdeadbeef) |
---|
43 | |
---|
44 | /* Store 10 values */ |
---|
45 | l.and r3, r2, r2 |
---|
46 | |
---|
47 | l.sw - 0(r1), r3 |
---|
48 | l.addi r3, r3, 1 |
---|
49 | |
---|
50 | l.sw - 4(r1), r3 |
---|
51 | l.addi r3, r3, 1 |
---|
52 | |
---|
53 | l.sw - 8(r1), r3 |
---|
54 | l.addi r3, r3, 1 |
---|
55 | |
---|
56 | l.sw -12(r1), r3 |
---|
57 | l.addi r3, r3, 1 |
---|
58 | |
---|
59 | l.sw -16(r1), r3 |
---|
60 | l.addi r3, r3, 1 |
---|
61 | |
---|
62 | l.sw -20(r1), r3 |
---|
63 | l.addi r3, r3, 1 |
---|
64 | |
---|
65 | l.sw -24(r1), r3 |
---|
66 | l.addi r3, r3, 1 |
---|
67 | |
---|
68 | l.sw -28(r1), r3 |
---|
69 | l.addi r3, r3, 1 |
---|
70 | |
---|
71 | l.sw -32(r1), r3 |
---|
72 | l.addi r3, r3, 1 |
---|
73 | |
---|
74 | l.sw -36(r1), r3 |
---|
75 | l.addi r3, r3, 1 |
---|
76 | |
---|
77 | /* Load 10 values */ |
---|
78 | l.addi r3, r3, -1 /* increase too much*/ |
---|
79 | |
---|
80 | l.lwz r4, -36(r1) |
---|
81 | l.sfeq r4, r3 |
---|
82 | l.bnf _end_ko |
---|
83 | l.addi r3, r3, -1 |
---|
84 | |
---|
85 | l.lwz r4, -32(r1) |
---|
86 | l.sfeq r4, r3 |
---|
87 | l.bnf _end_ko |
---|
88 | l.addi r3, r3, -1 |
---|
89 | |
---|
90 | l.lwz r4, -28(r1) |
---|
91 | l.sfeq r4, r3 |
---|
92 | l.bnf _end_ko |
---|
93 | l.addi r3, r3, -1 |
---|
94 | |
---|
95 | l.lwz r4, -24(r1) |
---|
96 | l.sfeq r4, r3 |
---|
97 | l.bnf _end_ko |
---|
98 | l.addi r3, r3, -1 |
---|
99 | |
---|
100 | l.lwz r4, -20(r1) |
---|
101 | l.sfeq r4, r3 |
---|
102 | l.bnf _end_ko |
---|
103 | l.addi r3, r3, -1 |
---|
104 | |
---|
105 | l.lwz r4, -16(r1) |
---|
106 | l.sfeq r4, r3 |
---|
107 | l.bnf _end_ko |
---|
108 | l.addi r3, r3, -1 |
---|
109 | |
---|
110 | l.lwz r4, -12(r1) |
---|
111 | l.sfeq r4, r3 |
---|
112 | l.bnf _end_ko |
---|
113 | l.addi r3, r3, -1 |
---|
114 | |
---|
115 | l.lwz r4, - 8(r1) |
---|
116 | l.sfeq r4, r3 |
---|
117 | l.bnf _end_ko |
---|
118 | l.addi r3, r3, -1 |
---|
119 | |
---|
120 | l.lwz r4, - 4(r1) |
---|
121 | l.sfeq r4, r3 |
---|
122 | l.bnf _end_ko |
---|
123 | l.addi r3, r3, -1 |
---|
124 | |
---|
125 | l.lwz r4, - 0(r1) |
---|
126 | l.sfeq r4, r3 |
---|
127 | l.bnf _end_ko |
---|
128 | l.addi r3, r3, -1 |
---|
129 | |
---|
130 | /* Store 10 values */ |
---|
131 | l.and r3, r2, r2 |
---|
132 | |
---|
133 | l.sw - 0(r1), r3 |
---|
134 | l.addi r3, r3, 1 |
---|
135 | |
---|
136 | l.sw - 4(r1), r3 |
---|
137 | l.addi r3, r3, 1 |
---|
138 | |
---|
139 | l.sw - 8(r1), r3 |
---|
140 | l.addi r3, r3, 1 |
---|
141 | |
---|
142 | l.sw -12(r1), r3 |
---|
143 | l.addi r3, r3, 1 |
---|
144 | |
---|
145 | l.sw -16(r1), r3 |
---|
146 | l.addi r3, r3, 1 |
---|
147 | |
---|
148 | l.sw -20(r1), r3 |
---|
149 | l.addi r3, r3, 1 |
---|
150 | |
---|
151 | l.sw -24(r1), r3 |
---|
152 | l.addi r3, r3, 1 |
---|
153 | |
---|
154 | l.sw -28(r1), r3 |
---|
155 | l.addi r3, r3, 1 |
---|
156 | |
---|
157 | l.sw -32(r1), r3 |
---|
158 | l.addi r3, r3, 1 |
---|
159 | |
---|
160 | l.sw -36(r1), r3 |
---|
161 | l.addi r3, r3, 1 |
---|
162 | |
---|
163 | /* Load 10 values */ |
---|
164 | l.addi r3, r3, -1 /* increase too much*/ |
---|
165 | |
---|
166 | l.lws r4, -36(r1) |
---|
167 | l.sfeq r4, r3 |
---|
168 | l.bnf _end_ko |
---|
169 | l.addi r3, r3, -1 |
---|
170 | |
---|
171 | l.lws r4, -32(r1) |
---|
172 | l.sfeq r4, r3 |
---|
173 | l.bnf _end_ko |
---|
174 | l.addi r3, r3, -1 |
---|
175 | |
---|
176 | l.lws r4, -28(r1) |
---|
177 | l.sfeq r4, r3 |
---|
178 | l.bnf _end_ko |
---|
179 | l.addi r3, r3, -1 |
---|
180 | |
---|
181 | l.lws r4, -24(r1) |
---|
182 | l.sfeq r4, r3 |
---|
183 | l.bnf _end_ko |
---|
184 | l.addi r3, r3, -1 |
---|
185 | |
---|
186 | l.lws r4, -20(r1) |
---|
187 | l.sfeq r4, r3 |
---|
188 | l.bnf _end_ko |
---|
189 | l.addi r3, r3, -1 |
---|
190 | |
---|
191 | l.lws r4, -16(r1) |
---|
192 | l.sfeq r4, r3 |
---|
193 | l.bnf _end_ko |
---|
194 | l.addi r3, r3, -1 |
---|
195 | |
---|
196 | l.lws r4, -12(r1) |
---|
197 | l.sfeq r4, r3 |
---|
198 | l.bnf _end_ko |
---|
199 | l.addi r3, r3, -1 |
---|
200 | |
---|
201 | l.lws r4, - 8(r1) |
---|
202 | l.sfeq r4, r3 |
---|
203 | l.bnf _end_ko |
---|
204 | l.addi r3, r3, -1 |
---|
205 | |
---|
206 | l.lws r4, - 4(r1) |
---|
207 | l.sfeq r4, r3 |
---|
208 | l.bnf _end_ko |
---|
209 | l.addi r3, r3, -1 |
---|
210 | |
---|
211 | l.lws r4, - 0(r1) |
---|
212 | l.sfeq r4, r3 |
---|
213 | l.bnf _end_ko |
---|
214 | l.addi r3, r3, -1 |
---|
215 | |
---|
216 | /* end test */ |
---|
217 | l.j _end_ok |
---|
218 | l.nop |
---|
Note: See
TracBrowser
for help on using the repository browser.