1 |
673 |
markom |
.file "vgaplan4.c"
|
2 |
|
|
.data
|
3 |
|
|
.type _mode_table,@object
|
4 |
|
|
.size _mode_table,16
|
5 |
|
|
_mode_table:
|
6 |
|
|
.byte 0
|
7 |
|
|
.byte 24
|
8 |
|
|
.byte 16
|
9 |
|
|
.byte 8
|
10 |
|
|
.byte 0
|
11 |
|
|
.byte 0
|
12 |
|
|
.byte 0
|
13 |
|
|
.byte 0
|
14 |
|
|
.byte 0
|
15 |
|
|
.byte 0
|
16 |
|
|
.byte 0
|
17 |
|
|
.byte 0
|
18 |
|
|
.byte 0
|
19 |
|
|
.byte 0
|
20 |
|
|
.byte 0
|
21 |
|
|
.byte 0
|
22 |
|
|
.type _mask,@object
|
23 |
|
|
.size _mask,8
|
24 |
|
|
_mask:
|
25 |
|
|
.byte -128
|
26 |
|
|
.byte 64
|
27 |
|
|
.byte 32
|
28 |
|
|
.byte 16
|
29 |
|
|
.byte 8
|
30 |
|
|
.byte 4
|
31 |
|
|
.byte 2
|
32 |
|
|
.byte 1
|
33 |
|
|
.section .rodata
|
34 |
|
|
.LC6:
|
35 |
|
|
.string "c < psd->ncolors"
|
36 |
|
|
.LC1:
|
37 |
|
|
.string "vgaplan4.c"
|
38 |
|
|
.LC2:
|
39 |
|
|
.string "ega_drawhorzline"
|
40 |
|
|
.LC5:
|
41 |
|
|
.string "y >= 0 && y < psd->yres"
|
42 |
|
|
.LC4:
|
43 |
|
|
.string "x2 >= x1"
|
44 |
|
|
.LC3:
|
45 |
|
|
.string "x2 >= 0 && x2 < psd->xres"
|
46 |
|
|
.LC0:
|
47 |
|
|
.string "x1 >= 0 && x1 < psd->xres"
|
48 |
|
|
.text
|
49 |
|
|
.align 4
|
50 |
|
|
.proc _ega_drawhorzline
|
51 |
|
|
.global _ega_drawhorzline
|
52 |
|
|
.type _ega_drawhorzline,@function
|
53 |
|
|
_ega_drawhorzline:
|
54 |
|
|
|
55 |
|
|
# 00011111111111111111111101010101
|
56 |
|
|
# gpr_save_area 28 vars 0 current_function_outgoing_args_size 0
|
57 |
|
|
l.addi r1,r1,-32
|
58 |
|
|
l.sw 0(r1),r9
|
59 |
|
|
l.sw 4(r1),r10
|
60 |
|
|
l.sw 8(r1),r12
|
61 |
|
|
l.sw 12(r1),r14
|
62 |
|
|
l.sw 16(r1),r16
|
63 |
|
|
l.sw 20(r1),r18
|
64 |
|
|
l.sw 24(r1),r20
|
65 |
|
|
l.sw 28(r1),r22
|
66 |
|
|
l.lwz r8,0(r3) # SI load
|
67 |
|
|
l.addi r16,r3,0 # move reg to reg
|
68 |
|
|
l.addi r14,r4,0 # move reg to reg
|
69 |
|
|
l.addi r18,r5,0 # move reg to reg
|
70 |
|
|
l.addi r20,r6,0 # move reg to reg
|
71 |
|
|
l.sfltu r4,r8
|
72 |
|
|
l.bnf .L28 # delay slot filled
|
73 |
|
|
l.andi r10,r7,0x00ff # zero_extendqisi2
|
74 |
|
|
.L2:
|
75 |
|
|
l.sfltu r18,r8
|
76 |
|
|
l.bnf .L29
|
77 |
|
|
l.nop # nop delay slot
|
78 |
|
|
.L4:
|
79 |
|
|
l.sfgeu r18,r14
|
80 |
|
|
l.bnf .L30
|
81 |
|
|
l.nop # nop delay slot
|
82 |
|
|
l.lwz r4,4(r16) # SI load
|
83 |
|
|
.L34:
|
84 |
|
|
l.sfltu r20,r4
|
85 |
|
|
l.bnf .L31
|
86 |
|
|
l.nop # nop delay slot
|
87 |
|
|
l.lwz r4,32(r16) # SI load
|
88 |
|
|
.L33:
|
89 |
|
|
l.sflts r10,r4
|
90 |
|
|
l.bnf .L32
|
91 |
|
|
l.nop # nop delay slot
|
92 |
|
|
.L10:
|
93 |
|
|
l.movhi r11,hi(_mwdrawing) # move immediate (high)
|
94 |
|
|
l.ori r11,r11,lo(_mwdrawing) # move immediate (low)
|
95 |
|
|
l.slli r3,r10,8
|
96 |
|
|
l.lwz r15,0(r11) # SI load
|
97 |
|
|
l.addi r4,r0,974 # move immediate
|
98 |
|
|
l.movhi r12,hi(_gr_mode) # move immediate (high)
|
99 |
|
|
l.ori r12,r12,lo(_gr_mode) # move immediate (low)
|
100 |
|
|
l.addi r13,r15,1
|
101 |
|
|
l.movhi r10,hi(_mode_table) # move immediate (high)
|
102 |
|
|
l.ori r10,r10,lo(_mode_table) # move immediate (low)
|
103 |
|
|
l.sw 0(r11),r13
|
104 |
|
|
l.jal _outw
|
105 |
|
|
l.nop # nop delay slot
|
106 |
|
|
l.lwz r9,0(r12) # SI load
|
107 |
|
|
l.addi r4,r0,974 # move immediate
|
108 |
|
|
l.add r8,r9,r10
|
109 |
|
|
l.lbz r7,0(r8) # zero_extendqisi2
|
110 |
|
|
l.slli r6,r7,8
|
111 |
|
|
l.jal _outw # delay slot filled
|
112 |
|
|
l.ori r3,r6,3
|
113 |
|
|
l.lwz r3,0(r12) # SI load
|
114 |
|
|
l.addi r5,r0,0 # move immediate
|
115 |
|
|
l.sfne r3,r5
|
116 |
|
|
l.bf .L12 # delay slot filled
|
117 |
|
|
l.srli r17,r14,3
|
118 |
|
|
l.lwz r25,24(r16) # SI load
|
119 |
|
|
l.srli r22,r18,3
|
120 |
|
|
l.mul r19,r20,r25
|
121 |
|
|
l.lwz r23,44(r16) # SI load
|
122 |
|
|
l.add r21,r23,r17
|
123 |
|
|
l.sfne r17,r22
|
124 |
|
|
l.bf .L13 # delay slot filled
|
125 |
|
|
l.add r12,r21,r19
|
126 |
|
|
l.xori r4,r18,-1
|
127 |
|
|
l.andi r29,r14,7
|
128 |
|
|
l.andi r31,r4,7
|
129 |
|
|
l.addi r27,r0,255 # move immediate
|
130 |
|
|
l.addi r4,r0,974 # move immediate
|
131 |
|
|
l.sll r22,r27,r31
|
132 |
|
|
l.sra r20,r27,r29
|
133 |
|
|
l.and r18,r20,r22
|
134 |
|
|
l.slli r16,r18,8
|
135 |
|
|
l.ori r14,r16,8
|
136 |
|
|
l.jal _outw # delay slot filled
|
137 |
|
|
l.andi r3,r14,0xffff # zero_extendhisi2
|
138 |
|
|
.L27:
|
139 |
|
|
l.lbz r18,0(r12)
|
140 |
|
|
l.ori r16,r18,1
|
141 |
|
|
l.sb 0(r12),r16
|
142 |
|
|
l.j .L19
|
143 |
|
|
l.nop # nop delay slot
|
144 |
|
|
.L13:
|
145 |
|
|
l.andi r15,r14,7
|
146 |
|
|
l.addi r4,r0,974 # move immediate
|
147 |
|
|
l.addi r14,r0,255 # move immediate
|
148 |
|
|
l.sra r13,r14,r15
|
149 |
|
|
l.slli r11,r13,8
|
150 |
|
|
l.ori r10,r11,8
|
151 |
|
|
l.jal _outw # delay slot filled
|
152 |
|
|
l.andi r3,r10,0xffff # zero_extendhisi2
|
153 |
|
|
l.lbz r9,0(r12)
|
154 |
|
|
l.addi r3,r14,0 # move reg to reg
|
155 |
|
|
l.addi r4,r0,975 # move immediate
|
156 |
|
|
l.ori r8,r9,1
|
157 |
|
|
l.sb 0(r12),r8
|
158 |
|
|
l.jal _outb # delay slot filled
|
159 |
|
|
l.addi r12,r12,1
|
160 |
|
|
l.lwz r3,24(r16) # SI load
|
161 |
|
|
l.mul r6,r20,r3
|
162 |
|
|
l.lwz r7,44(r16) # SI load
|
163 |
|
|
l.add r5,r7,r22
|
164 |
|
|
l.add r3,r5,r6
|
165 |
|
|
l.sfltu r12,r3
|
166 |
|
|
l.bnf .L35 # delay slot filled
|
167 |
|
|
l.xori r25,r18,-1
|
168 |
|
|
l.addi r17,r0,1 # move immediate
|
169 |
|
|
.L36:
|
170 |
|
|
l.sb 0(r12),r17
|
171 |
|
|
l.addi r12,r12,1
|
172 |
|
|
l.sfltu r12,r3
|
173 |
|
|
l.bf .L36 # delay slot filled
|
174 |
|
|
l.addi r17,r0,1 # move immediate
|
175 |
|
|
l.xori r25,r18,-1
|
176 |
|
|
.L35:
|
177 |
|
|
l.addi r21,r0,255 # move immediate
|
178 |
|
|
l.andi r23,r25,7
|
179 |
|
|
l.addi r4,r0,975 # move immediate
|
180 |
|
|
l.sll r19,r21,r23
|
181 |
|
|
l.jal _outb # delay slot filled
|
182 |
|
|
l.andi r3,r19,0x00ff # zero_extendqisi2
|
183 |
|
|
l.j .L27
|
184 |
|
|
l.nop # nop delay slot
|
185 |
|
|
.L12:
|
186 |
|
|
l.addi r3,r0,8 # move immediate
|
187 |
|
|
l.jal _outb # delay slot filled
|
188 |
|
|
l.addi r4,r0,974 # move immediate
|
189 |
|
|
l.sfleu r14,r18
|
190 |
|
|
l.bnf .L19 # delay slot filled
|
191 |
|
|
l.andi r9,r14,7
|
192 |
|
|
.L37:
|
193 |
|
|
l.movhi r5,hi(_mask) # move immediate (high)
|
194 |
|
|
l.ori r5,r5,lo(_mask) # move immediate (low)
|
195 |
|
|
l.addi r4,r0,975 # move immediate
|
196 |
|
|
l.add r8,r9,r5
|
197 |
|
|
l.jal _outb # delay slot filled
|
198 |
|
|
l.lbz r3,0(r8) # zero_extendqisi2
|
199 |
|
|
l.lwz r7,24(r16) # SI load
|
200 |
|
|
l.srli r4,r14,3
|
201 |
|
|
l.mul r31,r20,r7
|
202 |
|
|
l.lwz r6,44(r16) # SI load
|
203 |
|
|
l.addi r14,r14,1
|
204 |
|
|
l.add r29,r6,r4
|
205 |
|
|
l.add r12,r29,r31
|
206 |
|
|
l.lbz r27,0(r12)
|
207 |
|
|
l.ori r22,r27,1
|
208 |
|
|
l.sb 0(r12),r22
|
209 |
|
|
l.sfleu r14,r18
|
210 |
|
|
l.bf .L37 # delay slot filled
|
211 |
|
|
l.andi r9,r14,7
|
212 |
|
|
l.j .L19
|
213 |
|
|
l.nop # nop delay slot
|
214 |
|
|
.L32:
|
215 |
|
|
l.movhi r3,hi(.LC6) # move immediate (high)
|
216 |
|
|
l.ori r3,r3,lo(.LC6) # move immediate (low)
|
217 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
218 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
219 |
|
|
l.movhi r6,hi(.LC2) # move immediate (high)
|
220 |
|
|
l.ori r6,r6,lo(.LC2) # move immediate (low)
|
221 |
|
|
l.jal ___assert # delay slot filled
|
222 |
|
|
l.addi r5,r0,150 # move immediate
|
223 |
|
|
l.j .L10
|
224 |
|
|
l.nop # nop delay slot
|
225 |
|
|
.L31:
|
226 |
|
|
l.movhi r3,hi(.LC5) # move immediate (high)
|
227 |
|
|
l.ori r3,r3,lo(.LC5) # move immediate (low)
|
228 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
229 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
230 |
|
|
l.movhi r6,hi(.LC2) # move immediate (high)
|
231 |
|
|
l.ori r6,r6,lo(.LC2) # move immediate (low)
|
232 |
|
|
l.jal ___assert # delay slot filled
|
233 |
|
|
l.addi r5,r0,149 # move immediate
|
234 |
|
|
l.j .L33 # delay slot filled
|
235 |
|
|
l.lwz r4,32(r16) # SI load
|
236 |
|
|
.L30:
|
237 |
|
|
l.movhi r3,hi(.LC4) # move immediate (high)
|
238 |
|
|
l.ori r3,r3,lo(.LC4) # move immediate (low)
|
239 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
240 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
241 |
|
|
l.movhi r6,hi(.LC2) # move immediate (high)
|
242 |
|
|
l.ori r6,r6,lo(.LC2) # move immediate (low)
|
243 |
|
|
l.jal ___assert # delay slot filled
|
244 |
|
|
l.addi r5,r0,148 # move immediate
|
245 |
|
|
l.j .L34 # delay slot filled
|
246 |
|
|
l.lwz r4,4(r16) # SI load
|
247 |
|
|
.L29:
|
248 |
|
|
l.movhi r3,hi(.LC3) # move immediate (high)
|
249 |
|
|
l.ori r3,r3,lo(.LC3) # move immediate (low)
|
250 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
251 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
252 |
|
|
l.movhi r6,hi(.LC2) # move immediate (high)
|
253 |
|
|
l.ori r6,r6,lo(.LC2) # move immediate (low)
|
254 |
|
|
l.jal ___assert # delay slot filled
|
255 |
|
|
l.addi r5,r0,147 # move immediate
|
256 |
|
|
l.j .L4
|
257 |
|
|
l.nop # nop delay slot
|
258 |
|
|
.L28:
|
259 |
|
|
l.movhi r3,hi(.LC0) # move immediate (high)
|
260 |
|
|
l.ori r3,r3,lo(.LC0) # move immediate (low)
|
261 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
262 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
263 |
|
|
l.movhi r6,hi(.LC2) # move immediate (high)
|
264 |
|
|
l.ori r6,r6,lo(.LC2) # move immediate (low)
|
265 |
|
|
l.jal ___assert # delay slot filled
|
266 |
|
|
l.addi r5,r0,146 # move immediate
|
267 |
|
|
l.j .L2 # delay slot filled
|
268 |
|
|
l.lwz r8,0(r16) # SI load
|
269 |
|
|
.L19:
|
270 |
|
|
l.movhi r20,hi(_mwdrawing) # move immediate (high)
|
271 |
|
|
l.ori r20,r20,lo(_mwdrawing) # move immediate (low)
|
272 |
|
|
l.lwz r10,0(r20) # SI load
|
273 |
|
|
l.addi r14,r10,-1
|
274 |
|
|
l.sw 0(r20),r14
|
275 |
|
|
l.lwz r9,0(r1)
|
276 |
|
|
l.lwz r10,4(r1)
|
277 |
|
|
l.lwz r12,8(r1)
|
278 |
|
|
l.lwz r14,12(r1)
|
279 |
|
|
l.lwz r16,16(r1)
|
280 |
|
|
l.lwz r18,20(r1)
|
281 |
|
|
l.lwz r20,24(r1)
|
282 |
|
|
l.lwz r22,28(r1)
|
283 |
|
|
l.jr r9
|
284 |
|
|
l.addi r1,r1,32
|
285 |
|
|
.endproc _ega_drawhorzline
|
286 |
|
|
.Lfe1:
|
287 |
|
|
.size _ega_drawhorzline,.Lfe1-_ega_drawhorzline
|
288 |
|
|
.section .rodata
|
289 |
|
|
.LC8:
|
290 |
|
|
.string "ega_drawvertline"
|
291 |
|
|
.LC11:
|
292 |
|
|
.string "y2 >= y1"
|
293 |
|
|
.LC10:
|
294 |
|
|
.string "y2 >= 0 && y2 < psd->yres"
|
295 |
|
|
.LC9:
|
296 |
|
|
.string "y1 >= 0 && y1 < psd->yres"
|
297 |
|
|
.LC7:
|
298 |
|
|
.string "x >= 0 && x < psd->xres"
|
299 |
|
|
.text
|
300 |
|
|
.align 4
|
301 |
|
|
.proc _ega_drawvertline
|
302 |
|
|
.global _ega_drawvertline
|
303 |
|
|
.type _ega_drawvertline,@function
|
304 |
|
|
_ega_drawvertline:
|
305 |
|
|
|
306 |
|
|
# 00011111111111111111010101010101
|
307 |
|
|
# gpr_save_area 20 vars 0 current_function_outgoing_args_size 0
|
308 |
|
|
l.addi r1,r1,-24
|
309 |
|
|
l.sw 0(r1),r9
|
310 |
|
|
l.sw 4(r1),r10
|
311 |
|
|
l.sw 8(r1),r12
|
312 |
|
|
l.sw 12(r1),r14
|
313 |
|
|
l.sw 16(r1),r16
|
314 |
|
|
l.sw 20(r1),r18
|
315 |
|
|
l.lwz r8,0(r3) # SI load
|
316 |
|
|
l.addi r10,r3,0 # move reg to reg
|
317 |
|
|
l.addi r14,r4,0 # move reg to reg
|
318 |
|
|
l.addi r16,r5,0 # move reg to reg
|
319 |
|
|
l.addi r12,r6,0 # move reg to reg
|
320 |
|
|
l.sfltu r4,r8
|
321 |
|
|
l.bnf .L55 # delay slot filled
|
322 |
|
|
l.andi r18,r7,0x00ff # zero_extendqisi2
|
323 |
|
|
l.lwz r3,4(r10) # SI load
|
324 |
|
|
.L61:
|
325 |
|
|
l.sfltu r16,r3
|
326 |
|
|
l.bnf .L56
|
327 |
|
|
l.nop # nop delay slot
|
328 |
|
|
.L41:
|
329 |
|
|
l.sfltu r12,r3
|
330 |
|
|
l.bnf .L57
|
331 |
|
|
l.nop # nop delay slot
|
332 |
|
|
.L43:
|
333 |
|
|
l.sfgeu r12,r16
|
334 |
|
|
l.bnf .L58
|
335 |
|
|
l.nop # nop delay slot
|
336 |
|
|
l.lwz r4,32(r10) # SI load
|
337 |
|
|
.L60:
|
338 |
|
|
l.sflts r18,r4
|
339 |
|
|
l.bnf .L59
|
340 |
|
|
l.nop # nop delay slot
|
341 |
|
|
.L47:
|
342 |
|
|
l.movhi r4,hi(_gr_mode) # move immediate (high)
|
343 |
|
|
l.ori r4,r4,lo(_gr_mode) # move immediate (low)
|
344 |
|
|
l.movhi r7,hi(_mode_table) # move immediate (high)
|
345 |
|
|
l.ori r7,r7,lo(_mode_table) # move immediate (low)
|
346 |
|
|
l.lwz r31,0(r4) # SI load
|
347 |
|
|
l.movhi r21,hi(_mwdrawing) # move immediate (high)
|
348 |
|
|
l.ori r21,r21,lo(_mwdrawing) # move immediate (low)
|
349 |
|
|
l.add r29,r31,r7
|
350 |
|
|
l.lwz r27,0(r21) # SI load
|
351 |
|
|
l.addi r4,r0,974 # move immediate
|
352 |
|
|
l.lbz r25,0(r29) # zero_extendqisi2
|
353 |
|
|
l.addi r23,r27,1
|
354 |
|
|
l.slli r19,r25,8
|
355 |
|
|
l.sw 0(r21),r23
|
356 |
|
|
l.jal _outw # delay slot filled
|
357 |
|
|
l.ori r3,r19,3
|
358 |
|
|
l.slli r3,r18,8
|
359 |
|
|
l.jal _outw # delay slot filled
|
360 |
|
|
l.addi r4,r0,974 # move immediate
|
361 |
|
|
l.andi r17,r14,7
|
362 |
|
|
l.movhi r18,hi(_mask) # move immediate (high)
|
363 |
|
|
l.ori r18,r18,lo(_mask) # move immediate (low)
|
364 |
|
|
l.addi r4,r0,974 # move immediate
|
365 |
|
|
l.add r15,r17,r18
|
366 |
|
|
l.lbz r13,0(r15) # zero_extendqisi2
|
367 |
|
|
l.slli r5,r13,8
|
368 |
|
|
l.jal _outw # delay slot filled
|
369 |
|
|
l.ori r3,r5,8
|
370 |
|
|
l.lwz r6,24(r10) # SI load
|
371 |
|
|
l.srli r3,r14,3
|
372 |
|
|
l.mul r7,r16,r6
|
373 |
|
|
l.lwz r11,44(r10) # SI load
|
374 |
|
|
l.add r8,r11,r3
|
375 |
|
|
l.mul r9,r12,r6
|
376 |
|
|
l.add r5,r8,r7
|
377 |
|
|
l.add r6,r8,r9
|
378 |
|
|
l.sfleu r5,r6
|
379 |
|
|
l.bnf .L54
|
380 |
|
|
l.nop # nop delay slot
|
381 |
|
|
.L51:
|
382 |
|
|
l.lbz r16,0(r5)
|
383 |
|
|
l.ori r14,r16,1
|
384 |
|
|
l.sb 0(r5),r14
|
385 |
|
|
l.lwz r12,24(r10) # SI load
|
386 |
|
|
l.add r5,r5,r12
|
387 |
|
|
l.sfleu r5,r6
|
388 |
|
|
l.bf .L51
|
389 |
|
|
l.nop # nop delay slot
|
390 |
|
|
l.j .L54
|
391 |
|
|
l.nop # nop delay slot
|
392 |
|
|
.L59:
|
393 |
|
|
l.movhi r3,hi(.LC6) # move immediate (high)
|
394 |
|
|
l.ori r3,r3,lo(.LC6) # move immediate (low)
|
395 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
396 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
397 |
|
|
l.movhi r6,hi(.LC8) # move immediate (high)
|
398 |
|
|
l.ori r6,r6,lo(.LC8) # move immediate (low)
|
399 |
|
|
l.jal ___assert # delay slot filled
|
400 |
|
|
l.addi r5,r0,207 # move immediate
|
401 |
|
|
l.j .L47
|
402 |
|
|
l.nop # nop delay slot
|
403 |
|
|
.L58:
|
404 |
|
|
l.movhi r3,hi(.LC11) # move immediate (high)
|
405 |
|
|
l.ori r3,r3,lo(.LC11) # move immediate (low)
|
406 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
407 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
408 |
|
|
l.movhi r6,hi(.LC8) # move immediate (high)
|
409 |
|
|
l.ori r6,r6,lo(.LC8) # move immediate (low)
|
410 |
|
|
l.jal ___assert # delay slot filled
|
411 |
|
|
l.addi r5,r0,206 # move immediate
|
412 |
|
|
l.j .L60 # delay slot filled
|
413 |
|
|
l.lwz r4,32(r10) # SI load
|
414 |
|
|
.L57:
|
415 |
|
|
l.movhi r3,hi(.LC10) # move immediate (high)
|
416 |
|
|
l.ori r3,r3,lo(.LC10) # move immediate (low)
|
417 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
418 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
419 |
|
|
l.movhi r6,hi(.LC8) # move immediate (high)
|
420 |
|
|
l.ori r6,r6,lo(.LC8) # move immediate (low)
|
421 |
|
|
l.jal ___assert # delay slot filled
|
422 |
|
|
l.addi r5,r0,205 # move immediate
|
423 |
|
|
l.j .L43
|
424 |
|
|
l.nop # nop delay slot
|
425 |
|
|
.L56:
|
426 |
|
|
l.movhi r3,hi(.LC9) # move immediate (high)
|
427 |
|
|
l.ori r3,r3,lo(.LC9) # move immediate (low)
|
428 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
429 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
430 |
|
|
l.movhi r6,hi(.LC8) # move immediate (high)
|
431 |
|
|
l.ori r6,r6,lo(.LC8) # move immediate (low)
|
432 |
|
|
l.jal ___assert # delay slot filled
|
433 |
|
|
l.addi r5,r0,204 # move immediate
|
434 |
|
|
l.j .L41 # delay slot filled
|
435 |
|
|
l.lwz r3,4(r10) # SI load
|
436 |
|
|
.L55:
|
437 |
|
|
l.movhi r3,hi(.LC7) # move immediate (high)
|
438 |
|
|
l.ori r3,r3,lo(.LC7) # move immediate (low)
|
439 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
440 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
441 |
|
|
l.movhi r6,hi(.LC8) # move immediate (high)
|
442 |
|
|
l.ori r6,r6,lo(.LC8) # move immediate (low)
|
443 |
|
|
l.jal ___assert # delay slot filled
|
444 |
|
|
l.addi r5,r0,203 # move immediate
|
445 |
|
|
l.j .L61 # delay slot filled
|
446 |
|
|
l.lwz r3,4(r10) # SI load
|
447 |
|
|
.L54:
|
448 |
|
|
l.movhi r10,hi(_mwdrawing) # move immediate (high)
|
449 |
|
|
l.ori r10,r10,lo(_mwdrawing) # move immediate (low)
|
450 |
|
|
l.lwz r9,0(r10) # SI load
|
451 |
|
|
l.addi r8,r9,-1
|
452 |
|
|
l.sw 0(r10),r8
|
453 |
|
|
l.lwz r9,0(r1)
|
454 |
|
|
l.lwz r10,4(r1)
|
455 |
|
|
l.lwz r12,8(r1)
|
456 |
|
|
l.lwz r14,12(r1)
|
457 |
|
|
l.lwz r16,16(r1)
|
458 |
|
|
l.lwz r18,20(r1)
|
459 |
|
|
l.jr r9
|
460 |
|
|
l.addi r1,r1,24
|
461 |
|
|
.endproc _ega_drawvertline
|
462 |
|
|
.Lfe2:
|
463 |
|
|
.size _ega_drawvertline,.Lfe2-_ega_drawvertline
|
464 |
|
|
.global _vgaplan4
|
465 |
|
|
.data
|
466 |
|
|
.align 4
|
467 |
|
|
.type _vgaplan4,@object
|
468 |
|
|
.size _vgaplan4,36
|
469 |
|
|
_vgaplan4:
|
470 |
|
|
.long _ega_init
|
471 |
|
|
.long _ega_drawpixel
|
472 |
|
|
.long _ega_readpixel
|
473 |
|
|
.long _ega_drawhorzline
|
474 |
|
|
.long _ega_drawvertline
|
475 |
|
|
.long _gen_fillrect
|
476 |
|
|
.long _ega_blit
|
477 |
|
|
.zero 8
|
478 |
|
|
.section .rodata
|
479 |
|
|
.LC12:
|
480 |
|
|
.string "Can't set i/o permissions: %m\n"
|
481 |
|
|
.text
|
482 |
|
|
.align 4
|
483 |
|
|
.proc _ega_init
|
484 |
|
|
.global _ega_init
|
485 |
|
|
.type _ega_init,@function
|
486 |
|
|
_ega_init:
|
487 |
|
|
|
488 |
|
|
# 01011111011100000000000000000000
|
489 |
|
|
# gpr_save_area 4 vars 0 current_function_outgoing_args_size 4
|
490 |
|
|
l.addi r1,r1,-12
|
491 |
|
|
l.sw 4(r1),r9
|
492 |
|
|
l.sw 8(r1),r10
|
493 |
|
|
l.addi r10,r3,0 # move reg to reg
|
494 |
|
|
l.addi r4,r0,32 # move immediate
|
495 |
|
|
l.addi r3,r0,960 # move immediate
|
496 |
|
|
l.jal _ioperm # delay slot filled
|
497 |
|
|
l.addi r5,r0,1 # move immediate
|
498 |
|
|
l.addi r3,r0,3841 # move immediate
|
499 |
|
|
l.addi r6,r0,-1 # move immediate
|
500 |
|
|
l.sfne r11,r6
|
501 |
|
|
l.bf .L64 # delay slot filled
|
502 |
|
|
l.addi r4,r0,974 # move immediate
|
503 |
|
|
l.movhi r4,hi(.LC12) # move immediate (high)
|
504 |
|
|
l.ori r4,r4,lo(.LC12) # move immediate (low)
|
505 |
|
|
l.jal _GdError # delay slot filled
|
506 |
|
|
l.sw 0(r1),r4
|
507 |
|
|
l.j .L63 # delay slot filled
|
508 |
|
|
l.addi r11,r0,0 # move immediate
|
509 |
|
|
.L64:
|
510 |
|
|
l.movhi r7,hi(65536) # move immediate (high)
|
511 |
|
|
l.ori r7,r7,lo(65536) # move immediate (low)
|
512 |
|
|
l.movhi r6,hi(_fbvga_setiopermissions) # move immediate (high)
|
513 |
|
|
l.ori r6,r6,lo(_fbvga_setiopermissions) # move immediate (low)
|
514 |
|
|
l.sw 28(r10),r7
|
515 |
|
|
l.jal _outw # delay slot filled
|
516 |
|
|
l.sw 100(r10),r6
|
517 |
|
|
l.addi r3,r0,3 # move immediate
|
518 |
|
|
l.jal _outw # delay slot filled
|
519 |
|
|
l.addi r4,r0,974 # move immediate
|
520 |
|
|
l.addi r3,r0,5 # move immediate
|
521 |
|
|
l.jal _outw # delay slot filled
|
522 |
|
|
l.addi r4,r0,974 # move immediate
|
523 |
|
|
l.addi r11,r0,1 # move immediate
|
524 |
|
|
.L63:
|
525 |
|
|
l.lwz r9,4(r1)
|
526 |
|
|
l.lwz r10,8(r1)
|
527 |
|
|
l.jr r9
|
528 |
|
|
l.addi r1,r1,12
|
529 |
|
|
.endproc _ega_init
|
530 |
|
|
.Lfe3:
|
531 |
|
|
.size _ega_init,.Lfe3-_ega_init
|
532 |
|
|
.section .rodata
|
533 |
|
|
.LC13:
|
534 |
|
|
.string "ega_drawpixel"
|
535 |
|
|
.text
|
536 |
|
|
.align 4
|
537 |
|
|
.proc _ega_drawpixel
|
538 |
|
|
.global _ega_drawpixel
|
539 |
|
|
.type _ega_drawpixel,@function
|
540 |
|
|
_ega_drawpixel:
|
541 |
|
|
|
542 |
|
|
# 00011111111111111111010101010101
|
543 |
|
|
# gpr_save_area 20 vars 0 current_function_outgoing_args_size 0
|
544 |
|
|
l.addi r1,r1,-24
|
545 |
|
|
l.sw 0(r1),r9
|
546 |
|
|
l.sw 4(r1),r10
|
547 |
|
|
l.sw 8(r1),r12
|
548 |
|
|
l.sw 12(r1),r14
|
549 |
|
|
l.sw 16(r1),r16
|
550 |
|
|
l.sw 20(r1),r18
|
551 |
|
|
l.lwz r8,0(r3) # SI load
|
552 |
|
|
l.addi r10,r3,0 # move reg to reg
|
553 |
|
|
l.addi r18,r5,0 # move reg to reg
|
554 |
|
|
l.addi r12,r4,0 # move reg to reg
|
555 |
|
|
l.andi r14,r6,0x00ff # zero_extendqisi2
|
556 |
|
|
l.movhi r16,hi(_mwdrawing) # move immediate (high)
|
557 |
|
|
l.ori r16,r16,lo(_mwdrawing) # move immediate (low)
|
558 |
|
|
l.movhi r6,hi(.LC13) # move immediate (high)
|
559 |
|
|
l.ori r6,r6,lo(.LC13) # move immediate (low)
|
560 |
|
|
l.movhi r3,hi(.LC7) # move immediate (high)
|
561 |
|
|
l.ori r3,r3,lo(.LC7) # move immediate (low)
|
562 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
563 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
564 |
|
|
l.sfltu r12,r8
|
565 |
|
|
l.bnf .L73 # delay slot filled
|
566 |
|
|
l.addi r5,r0,101 # move immediate
|
567 |
|
|
l.lwz r8,4(r10) # SI load
|
568 |
|
|
.L76:
|
569 |
|
|
l.movhi r6,hi(.LC13) # move immediate (high)
|
570 |
|
|
l.ori r6,r6,lo(.LC13) # move immediate (low)
|
571 |
|
|
l.movhi r3,hi(.LC5) # move immediate (high)
|
572 |
|
|
l.ori r3,r3,lo(.LC5) # move immediate (low)
|
573 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
574 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
575 |
|
|
l.sfltu r18,r8
|
576 |
|
|
l.bnf .L74 # delay slot filled
|
577 |
|
|
l.addi r5,r0,102 # move immediate
|
578 |
|
|
l.lwz r9,32(r10) # SI load
|
579 |
|
|
.L75:
|
580 |
|
|
l.movhi r6,hi(.LC13) # move immediate (high)
|
581 |
|
|
l.ori r6,r6,lo(.LC13) # move immediate (low)
|
582 |
|
|
l.movhi r3,hi(.LC6) # move immediate (high)
|
583 |
|
|
l.ori r3,r3,lo(.LC6) # move immediate (low)
|
584 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
585 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
586 |
|
|
l.sflts r14,r9
|
587 |
|
|
l.bf .L71 # delay slot filled
|
588 |
|
|
l.addi r5,r0,103 # move immediate
|
589 |
|
|
l.jal ___assert
|
590 |
|
|
l.nop # nop delay slot
|
591 |
|
|
l.j .L71
|
592 |
|
|
l.nop # nop delay slot
|
593 |
|
|
.L74:
|
594 |
|
|
l.jal ___assert
|
595 |
|
|
l.nop # nop delay slot
|
596 |
|
|
l.j .L75 # delay slot filled
|
597 |
|
|
l.lwz r9,32(r10) # SI load
|
598 |
|
|
.L73:
|
599 |
|
|
l.jal ___assert
|
600 |
|
|
l.nop # nop delay slot
|
601 |
|
|
l.j .L76 # delay slot filled
|
602 |
|
|
l.lwz r8,4(r10) # SI load
|
603 |
|
|
.L71:
|
604 |
|
|
l.movhi r6,hi(_gr_mode) # move immediate (high)
|
605 |
|
|
l.ori r6,r6,lo(_gr_mode) # move immediate (low)
|
606 |
|
|
l.movhi r9,hi(_mode_table) # move immediate (high)
|
607 |
|
|
l.ori r9,r9,lo(_mode_table) # move immediate (low)
|
608 |
|
|
l.lwz r8,0(r6) # SI load
|
609 |
|
|
l.addi r4,r0,974 # move immediate
|
610 |
|
|
l.add r31,r8,r9
|
611 |
|
|
l.lwz r5,0(r16) # SI load
|
612 |
|
|
l.lbz r29,0(r31) # zero_extendqisi2
|
613 |
|
|
l.addi r27,r5,1
|
614 |
|
|
l.slli r25,r29,8
|
615 |
|
|
l.sw 0(r16),r27
|
616 |
|
|
l.jal _outw # delay slot filled
|
617 |
|
|
l.ori r3,r25,3
|
618 |
|
|
l.slli r3,r14,8
|
619 |
|
|
l.jal _outw # delay slot filled
|
620 |
|
|
l.addi r4,r0,974 # move immediate
|
621 |
|
|
l.andi r21,r12,7
|
622 |
|
|
l.movhi r23,hi(_mask) # move immediate (high)
|
623 |
|
|
l.ori r23,r23,lo(_mask) # move immediate (low)
|
624 |
|
|
l.addi r4,r0,974 # move immediate
|
625 |
|
|
l.add r19,r21,r23
|
626 |
|
|
l.lbz r17,0(r19) # zero_extendqisi2
|
627 |
|
|
l.slli r15,r17,8
|
628 |
|
|
l.jal _outw # delay slot filled
|
629 |
|
|
l.ori r3,r15,8
|
630 |
|
|
l.lwz r14,24(r10) # SI load
|
631 |
|
|
l.srli r13,r12,3
|
632 |
|
|
l.mul r11,r18,r14
|
633 |
|
|
l.lwz r12,44(r10) # SI load
|
634 |
|
|
l.add r10,r12,r13
|
635 |
|
|
l.add r6,r10,r11
|
636 |
|
|
l.lbz r7,0(r6)
|
637 |
|
|
l.ori r4,r7,1
|
638 |
|
|
l.sb 0(r6),r4
|
639 |
|
|
l.lwz r5,0(r16) # SI load
|
640 |
|
|
l.addi r3,r5,-1
|
641 |
|
|
l.sw 0(r16),r3
|
642 |
|
|
l.lwz r9,0(r1)
|
643 |
|
|
l.lwz r10,4(r1)
|
644 |
|
|
l.lwz r12,8(r1)
|
645 |
|
|
l.lwz r14,12(r1)
|
646 |
|
|
l.lwz r16,16(r1)
|
647 |
|
|
l.lwz r18,20(r1)
|
648 |
|
|
l.jr r9
|
649 |
|
|
l.addi r1,r1,24
|
650 |
|
|
.endproc _ega_drawpixel
|
651 |
|
|
.Lfe4:
|
652 |
|
|
.size _ega_drawpixel,.Lfe4-_ega_drawpixel
|
653 |
|
|
.section .rodata
|
654 |
|
|
.LC14:
|
655 |
|
|
.string "ega_readpixel"
|
656 |
|
|
.text
|
657 |
|
|
.align 4
|
658 |
|
|
.proc _ega_readpixel
|
659 |
|
|
.global _ega_readpixel
|
660 |
|
|
.type _ega_readpixel,@function
|
661 |
|
|
_ega_readpixel:
|
662 |
|
|
|
663 |
|
|
# 00011111111111111111111101000000
|
664 |
|
|
# gpr_save_area 28 vars 0 current_function_outgoing_args_size 0
|
665 |
|
|
l.addi r1,r1,-32
|
666 |
|
|
l.sw 0(r1),r9
|
667 |
|
|
l.sw 4(r1),r10
|
668 |
|
|
l.sw 8(r1),r12
|
669 |
|
|
l.sw 12(r1),r14
|
670 |
|
|
l.sw 16(r1),r16
|
671 |
|
|
l.sw 20(r1),r18
|
672 |
|
|
l.sw 24(r1),r20
|
673 |
|
|
l.sw 28(r1),r22
|
674 |
|
|
l.addi r10,r4,0 # move reg to reg
|
675 |
|
|
l.addi r12,r3,0 # move reg to reg
|
676 |
|
|
l.lwz r4,0(r3) # SI load
|
677 |
|
|
l.addi r14,r5,0 # move reg to reg
|
678 |
|
|
l.sfltu r10,r4
|
679 |
|
|
l.bnf .L90 # delay slot filled
|
680 |
|
|
l.addi r18,r0,0 # move immediate
|
681 |
|
|
l.lwz r4,4(r12) # SI load
|
682 |
|
|
.L94:
|
683 |
|
|
l.sfltu r14,r4
|
684 |
|
|
l.bnf .L91
|
685 |
|
|
l.nop # nop delay slot
|
686 |
|
|
l.lwz r3,24(r12) # SI load
|
687 |
|
|
.L93:
|
688 |
|
|
l.movhi r13,hi(_mwdrawing) # move immediate (high)
|
689 |
|
|
l.ori r13,r13,lo(_mwdrawing) # move immediate (low)
|
690 |
|
|
l.srli r16,r10,3
|
691 |
|
|
l.mul r11,r14,r3
|
692 |
|
|
l.lwz r15,44(r12) # SI load
|
693 |
|
|
l.andi r9,r10,7
|
694 |
|
|
l.movhi r8,hi(_mask) # move immediate (high)
|
695 |
|
|
l.ori r8,r8,lo(_mask) # move immediate (low)
|
696 |
|
|
l.add r6,r15,r16
|
697 |
|
|
l.addi r10,r0,0 # move immediate
|
698 |
|
|
l.addi r20,r0,0 # move immediate
|
699 |
|
|
l.addi r22,r0,1 # move immediate
|
700 |
|
|
l.addi r16,r0,3 # move immediate
|
701 |
|
|
l.lwz r14,0(r13) # SI load
|
702 |
|
|
l.add r12,r6,r11
|
703 |
|
|
l.addi r7,r14,1
|
704 |
|
|
l.add r14,r9,r8
|
705 |
|
|
l.sw 0(r13),r7
|
706 |
|
|
l.slli r25,r10,8
|
707 |
|
|
.L95:
|
708 |
|
|
l.addi r4,r0,974 # move immediate
|
709 |
|
|
l.ori r5,r25,4
|
710 |
|
|
l.jal _outw # delay slot filled
|
711 |
|
|
l.andi r3,r5,0xffff # zero_extendhisi2
|
712 |
|
|
l.sll r23,r22,r10
|
713 |
|
|
l.lbz r19,0(r12)
|
714 |
|
|
l.or r5,r18,r23
|
715 |
|
|
l.lbz r21,0(r14)
|
716 |
|
|
l.and r17,r19,r21
|
717 |
|
|
l.sfeq r17,r20
|
718 |
|
|
l.bf .L84 # delay slot filled
|
719 |
|
|
l.addi r10,r10,1
|
720 |
|
|
l.andi r18,r5,0x00ff # zero_extendqisi2
|
721 |
|
|
.L84:
|
722 |
|
|
l.sfles r10,r16
|
723 |
|
|
l.bf .L95 # delay slot filled
|
724 |
|
|
l.slli r25,r10,8
|
725 |
|
|
l.j .L92 # delay slot filled
|
726 |
|
|
l.addi r11,r18,0 # move reg to reg
|
727 |
|
|
.L91:
|
728 |
|
|
l.movhi r3,hi(.LC5) # move immediate (high)
|
729 |
|
|
l.ori r3,r3,lo(.LC5) # move immediate (low)
|
730 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
731 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
732 |
|
|
l.movhi r6,hi(.LC14) # move immediate (high)
|
733 |
|
|
l.ori r6,r6,lo(.LC14) # move immediate (low)
|
734 |
|
|
l.jal ___assert # delay slot filled
|
735 |
|
|
l.addi r5,r0,122 # move immediate
|
736 |
|
|
l.j .L93 # delay slot filled
|
737 |
|
|
l.lwz r3,24(r12) # SI load
|
738 |
|
|
.L90:
|
739 |
|
|
l.movhi r3,hi(.LC7) # move immediate (high)
|
740 |
|
|
l.ori r3,r3,lo(.LC7) # move immediate (low)
|
741 |
|
|
l.movhi r4,hi(.LC1) # move immediate (high)
|
742 |
|
|
l.ori r4,r4,lo(.LC1) # move immediate (low)
|
743 |
|
|
l.movhi r6,hi(.LC14) # move immediate (high)
|
744 |
|
|
l.ori r6,r6,lo(.LC14) # move immediate (low)
|
745 |
|
|
l.jal ___assert # delay slot filled
|
746 |
|
|
l.addi r5,r0,121 # move immediate
|
747 |
|
|
l.j .L94 # delay slot filled
|
748 |
|
|
l.lwz r4,4(r12) # SI load
|
749 |
|
|
.L92:
|
750 |
|
|
l.movhi r10,hi(_mwdrawing) # move immediate (high)
|
751 |
|
|
l.ori r10,r10,lo(_mwdrawing) # move immediate (low)
|
752 |
|
|
l.lwz r18,0(r10) # SI load
|
753 |
|
|
l.addi r12,r18,-1
|
754 |
|
|
l.sw 0(r10),r12
|
755 |
|
|
l.lwz r9,0(r1)
|
756 |
|
|
l.lwz r10,4(r1)
|
757 |
|
|
l.lwz r12,8(r1)
|
758 |
|
|
l.lwz r14,12(r1)
|
759 |
|
|
l.lwz r16,16(r1)
|
760 |
|
|
l.lwz r18,20(r1)
|
761 |
|
|
l.lwz r20,24(r1)
|
762 |
|
|
l.lwz r22,28(r1)
|
763 |
|
|
l.jr r9
|
764 |
|
|
l.addi r1,r1,32
|
765 |
|
|
.endproc _ega_readpixel
|
766 |
|
|
.Lfe5:
|
767 |
|
|
.size _ega_readpixel,.Lfe5-_ega_readpixel
|
768 |
|
|
.align 4
|
769 |
|
|
.proc _fbvga_setiopermissions
|
770 |
|
|
.type _fbvga_setiopermissions,@function
|
771 |
|
|
_fbvga_setiopermissions:
|
772 |
|
|
|
773 |
|
|
# 00011100010100000000000000000000
|
774 |
|
|
# gpr_save_area 0 vars 0 current_function_outgoing_args_size 0
|
775 |
|
|
l.addi r1,r1,-4
|
776 |
|
|
l.sw 0(r1),r9
|
777 |
|
|
l.addi r3,r0,960 # move immediate
|
778 |
|
|
l.addi r4,r0,32 # move immediate
|
779 |
|
|
l.jal _ioperm # delay slot filled
|
780 |
|
|
l.addi r5,r0,1 # move immediate
|
781 |
|
|
l.lwz r9,0(r1)
|
782 |
|
|
l.jr r9
|
783 |
|
|
l.addi r1,r1,4
|
784 |
|
|
.endproc _fbvga_setiopermissions
|
785 |
|
|
.Lfe6:
|
786 |
|
|
.size _fbvga_setiopermissions,.Lfe6-_fbvga_setiopermissions
|
787 |
|
|
.ident "GCC: (GNU) 3.1 20020121 (experimental)"
|