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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [lcc/] [alpha/] [osf/] [tst/] [sort.sbk] - Blame information for rev 58

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

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

powered by: WebSVN 2.1.0

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