OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [lcc/] [mips/] [irix/] [tst/] [sort.sbk] - Blame information for rev 57

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 hellwig
.set reorder
2
.globl in
3
.data
4
.align 2
5
in:
6
.word 0xa
7
.word 0x20
8
.word 0xffffffff
9
.word 0x237
10
.word 0x3
11
.word 0x12
12
.word 0x1
13
.word 0xffffffcd
14
.word 0x315
15
.word 0x0
16
.globl main
17
.text
18
.text
19
.align 2
20
.ent main
21
main:
22
.frame $sp,32,$31
23
.set noreorder
24
.cpload $25
25
.set reorder
26
addu $sp,$sp,-32
27
.mask 0xc2000000,-8
28
.cprestore 16
29
sw $30,20($sp)
30
sw $31,24($sp)
31
la $4,in
32
la $5,10
33
jal sort
34
move $30,$0
35
b L.5
36
L.2:
37
sll $24,$30,2
38
lw $4,in($24)
39
jal putd
40
la $4,10
41
jal putchar
42
L.3:
43
la $30,1($30)
44
L.5:
45
move $24,$30
46
la $15,10
47
bltu $24,$15,L.2
48
move $2,$0
49
L.1:
50
lw $25,16($sp)
51
lw $30,20($sp)
52
lw $31,24($sp)
53
addu $sp,$sp,32
54
j $31
55
.end main
56
.globl putd
57
.text
58
.align 2
59
.ent putd
60
putd:
61
.frame $sp,32,$31
62
.set noreorder
63
.cpload $25
64
.set reorder
65
addu $sp,$sp,-32
66
.mask 0xc2000000,-8
67
.cprestore 16
68
sw $30,20($sp)
69
sw $31,24($sp)
70
move $30,$4
71
bge $30,$0,L.7
72
la $4,45
73
jal putchar
74
negu $30,$30
75
L.7:
76
la $24,10
77
div $24,$30,$24
78
beq $24,$0,L.9
79
la $24,10
80
div $4,$30,$24
81
jal putd
82
L.9:
83
la $24,10
84
rem $24,$30,$24
85
la $4,48($24)
86
jal putchar
87
move $2,$0
88
L.6:
89
lw $25,16($sp)
90
lw $30,20($sp)
91
lw $31,24($sp)
92
addu $sp,$sp,32
93
j $31
94
.end putd
95
.globl sort
96
.text
97
.align 2
98
.ent sort
99
sort:
100
.frame $sp,32,$31
101
.set noreorder
102
.cpload $25
103
.set reorder
104
addu $sp,$sp,-32
105
.mask 0x82000000,-12
106
.cprestore 16
107
sw $31,20($sp)
108
sw $4,32($sp)
109
sw $5,36($sp)
110
lw $24,0+32($sp)
111
sw $24,xx
112
move $4,$24
113
move $5,$0
114
lw $24,4+32($sp)
115
subu $24,$24,1
116
sw $24,4+32($sp)
117
move $6,$24
118
jal quick
119
move $2,$0
120
L.11:
121
lw $25,16($sp)
122
lw $31,20($sp)
123
addu $sp,$sp,32
124
j $31
125
.end sort
126
.globl quick
127
.text
128
.align 2
129
.ent quick
130
quick:
131
.frame $sp,48,$31
132
.set noreorder
133
.cpload $25
134
.set reorder
135
addu $sp,$sp,-48
136
.mask 0xc2e00000,-12
137
sw $21,16($sp)
138
sw $22,20($sp)
139
sw $23,24($sp)
140
.cprestore 28
141
sw $30,32($sp)
142
sw $31,36($sp)
143
move $30,$4
144
move $23,$5
145
move $22,$6
146
blt $23,$22,L.13
147
move $2,$0
148
b L.12
149
L.13:
150
move $4,$30
151
move $5,$23
152
move $6,$22
153
jal partition
154
move $21,$2
155
move $4,$30
156
move $5,$23
157
subu $6,$21,1
158
jal quick
159
move $4,$30
160
la $5,1($21)
161
move $6,$22
162
jal quick
163
move $2,$0
164
L.12:
165
lw $21,16($sp)
166
lw $22,20($sp)
167
lw $23,24($sp)
168
lw $25,28($sp)
169
lw $30,32($sp)
170
lw $31,36($sp)
171
addu $sp,$sp,48
172
j $31
173
.end quick
174
.globl partition
175
.text
176
.align 2
177
.ent partition
178
partition:
179
.frame $sp,48,$31
180
.set noreorder
181
.cpload $25
182
.set reorder
183
addu $sp,$sp,-48
184
.mask 0xc2f00000,-8
185
sw $20,16($sp)
186
sw $21,20($sp)
187
sw $22,24($sp)
188
sw $23,28($sp)
189
.cprestore 32
190
sw $30,36($sp)
191
sw $31,40($sp)
192
move $30,$4
193
move $23,$5
194
move $22,$6
195
la $22,1($22)
196
move $20,$23
197
sll $24,$20,2
198
addu $24,$24,$30
199
lw $21,($24)
200
b L.17
201
L.16:
202
la $23,1($23)
203
b L.20
204
L.19:
205
la $23,1($23)
206
L.20:
207
sll $24,$23,2
208
addu $24,$24,$30
209
lw $24,($24)
210
blt $24,$21,L.19
211
subu $22,$22,1
212
b L.23
213
L.22:
214
subu $22,$22,1
215
L.23:
216
sll $24,$22,2
217
addu $24,$24,$30
218
lw $24,($24)
219
bgt $24,$21,L.22
220
bge $23,$22,L.25
221
sll $24,$23,2
222
addu $4,$24,$30
223
sll $24,$22,2
224
addu $5,$24,$30
225
jal exchange
226
L.25:
227
L.17:
228
blt $23,$22,L.16
229
sll $24,$20,2
230
addu $4,$24,$30
231
sll $24,$22,2
232
addu $5,$24,$30
233
jal exchange
234
move $2,$22
235
L.15:
236
lw $20,16($sp)
237
lw $21,20($sp)
238
lw $22,24($sp)
239
lw $23,28($sp)
240
lw $25,32($sp)
241
lw $30,36($sp)
242
lw $31,40($sp)
243
addu $sp,$sp,48
244
j $31
245
.end partition
246
.globl exchange
247
.text
248
.align 2
249
.ent exchange
250
exchange:
251
.frame $sp,48,$31
252
.set noreorder
253
.cpload $25
254
.set reorder
255
addu $sp,$sp,-48
256
.mask 0xc2800000,-20
257
sw $23,16($sp)
258
.cprestore 20
259
sw $30,24($sp)
260
sw $31,28($sp)
261
move $30,$4
262
move $23,$5
263
la $4,L.28
264
lw $24,xx
265
la $15,4
266
move $14,$30
267
subu $14,$14,$24
268
div $5,$14,$15
269
move $14,$23
270
subu $24,$14,$24
271
div $6,$24,$15
272
jal printf
273
lw $24,($30)
274
sw $24,-4+48($sp)
275
lw $24,($23)
276
sw $24,($30)
277
lw $24,-4+48($sp)
278
sw $24,($23)
279
move $2,$0
280
L.27:
281
lw $23,16($sp)
282
lw $25,20($sp)
283
lw $30,24($sp)
284
lw $31,28($sp)
285
addu $sp,$sp,48
286
j $31
287
.end exchange
288
.globl xx
289
.comm xx,4
290
.rdata
291
.align 0
292
L.28:
293
.byte 101
294
.byte 120
295
.byte 99
296
.byte 104
297
.byte 97
298
.byte 110
299
.byte 103
300
.byte 101
301
.byte 40
302
.byte 37
303
.byte 100
304
.byte 44
305
.byte 37
306
.byte 100
307
.byte 41
308
.byte 10
309
.byte 0

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.