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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [lcc/] [x86/] [linux/] [tst/] [wf1.sbk] - Blame information for rev 253

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

Line No. Rev Author Line
1 4 hellwig
.globl main
2
.text
3
.align 16
4
.type main,@function
5
main:
6
pushl %ebp
7
pushl %ebx
8
pushl %esi
9
pushl %edi
10
movl %esp,%ebp
11
subl $24,%esp
12
movl $0,-24(%ebp)
13
movl $0,next
14
jmp .LC3
15
.LC2:
16
leal -24(%ebp),%edi
17
pushl %edi
18
leal -20(%ebp),%edi
19
pushl %edi
20
call lookup
21
addl $8,%esp
22
incl (,%eax)
23
.LC3:
24
leal -20(%ebp),%edi
25
pushl %edi
26
call getword
27
addl $4,%esp
28
cmpl $0,%eax
29
jne .LC2
30
pushl -24(%ebp)
31
call tprint
32
addl $4,%esp
33
mov $0,%eax
34
.LC1:
35
movl %ebp,%esp
36
popl %edi
37
popl %esi
38
popl %ebx
39
popl %ebp
40
ret
41
.Lf5:
42
.size main,.Lf5-main
43
.globl err
44
.align 16
45
.type err,@function
46
err:
47
pushl %ebp
48
pushl %ebx
49
pushl %esi
50
pushl %edi
51
movl %esp,%ebp
52
pushl 20(%ebp)
53
pushl $.LC7
54
call printf
55
addl $8,%esp
56
pushl $1
57
call exit
58
addl $4,%esp
59
mov $0,%eax
60
.LC6:
61
movl %ebp,%esp
62
popl %edi
63
popl %esi
64
popl %ebx
65
popl %ebp
66
ret
67
.Lf8:
68
.size err,.Lf8-err
69
.globl getword
70
.align 16
71
.type getword,@function
72
getword:
73
pushl %ebp
74
pushl %ebx
75
pushl %esi
76
pushl %edi
77
movl %esp,%ebp
78
subl $8,%esp
79
.LC10:
80
.LC11:
81
call getchar
82
movl %eax,%edi
83
movl %edi,-4(%ebp)
84
cmpl $-1,%edi
85
je .LC13
86
pushl -4(%ebp)
87
call isletter
88
addl $4,%esp
89
cmpl $0,%eax
90
je .LC10
91
.LC13:
92
movl 20(%ebp),%edi
93
movl %edi,-8(%ebp)
94
jmp .LC17
95
.LC14:
96
movl -8(%ebp),%edi
97
leal 1(%edi),%esi
98
movl %esi,-8(%ebp)
99
movl -4(%ebp),%esi
100
movl %esi,%ebx
101
movb %bl,(,%edi)
102
.LC15:
103
call getchar
104
movl %eax,-4(%ebp)
105
.LC17:
106
pushl -4(%ebp)
107
call isletter
108
addl $4,%esp
109
movl %eax,-4(%ebp)
110
cmpl $0,%eax
111
jne .LC14
112
movl -8(%ebp),%edi
113
movb $0,(,%edi)
114
movl -8(%ebp),%edi
115
movl 20(%ebp),%esi
116
cmpl %esi,%edi
117
jbe .LC18
118
mov $1,%eax
119
jmp .LC9
120
.LC18:
121
mov $0,%eax
122
.LC9:
123
movl %ebp,%esp
124
popl %edi
125
popl %esi
126
popl %ebx
127
popl %ebp
128
ret
129
.Lf20:
130
.size getword,.Lf20-getword
131
.globl isletter
132
.align 16
133
.type isletter,@function
134
isletter:
135
pushl %ebp
136
pushl %ebx
137
pushl %esi
138
pushl %edi
139
movl %esp,%ebp
140
movl 20(%ebp),%edi
141
cmpl $65,%edi
142
jl .LC22
143
cmpl $90,%edi
144
jg .LC22
145
addl $32,20(%ebp)
146
.LC22:
147
movl 20(%ebp),%edi
148
cmpl $97,%edi
149
jl .LC24
150
cmpl $122,%edi
151
jg .LC24
152
movl 20(%ebp),%eax
153
jmp .LC21
154
.LC24:
155
mov $0,%eax
156
.LC21:
157
movl %ebp,%esp
158
popl %edi
159
popl %esi
160
popl %ebx
161
popl %ebp
162
ret
163
.Lf26:
164
.size isletter,.Lf26-isletter
165
.globl lookup
166
.align 16
167
.type lookup,@function
168
lookup:
169
pushl %ebp
170
pushl %ebx
171
pushl %esi
172
pushl %edi
173
movl %esp,%ebp
174
subl $4,%esp
175
movl 24(%ebp),%edi
176
movl (,%edi),%edi
177
cmpl $0,%edi
178
je .LC28
179
movl 24(%ebp),%edi
180
movl (,%edi),%edi
181
pushl 12(%edi)
182
pushl 20(%ebp)
183
call strcmp
184
addl $8,%esp
185
movl %eax,-4(%ebp)
186
cmpl $0,-4(%ebp)
187
jge .LC30
188
movl 24(%ebp),%edi
189
movl (,%edi),%edi
190
leal 4(%edi),%edi
191
pushl %edi
192
pushl 20(%ebp)
193
call lookup
194
addl $8,%esp
195
movl %eax,%edi
196
jmp .LC27
197
.LC30:
198
cmpl $0,-4(%ebp)
199
jle .LC32
200
movl 24(%ebp),%edi
201
movl (,%edi),%edi
202
leal 8(%edi),%edi
203
pushl %edi
204
pushl 20(%ebp)
205
call lookup
206
addl $8,%esp
207
movl %eax,%edi
208
jmp .LC27
209
.LC32:
210
movl 24(%ebp),%edi
211
movl (,%edi),%eax
212
jmp .LC27
213
.LC28:
214
cmpl $2000,next
215
jl .LC34
216
pushl $.LC36
217
call err
218
addl $4,%esp
219
.LC34:
220
movl next,%edi
221
sall $4,%edi
222
movl $0,words(%edi)
223
movl next,%edi
224
sall $4,%edi
225
movl $0,words+8(%edi)
226
movl $0,words+4(%edi)
227
pushl 20(%ebp)
228
call strlen
229
addl $4,%esp
230
leal 1(%eax),%edi
231
pushl %edi
232
call malloc
233
addl $4,%esp
234
movl next,%esi
235
sall $4,%esi
236
movl %eax,words+12(%esi)
237
movl next,%edi
238
sall $4,%edi
239
movl words+12(%edi),%edi
240
cmpl $0,%edi
241
jne .LC40
242
pushl $.LC43
243
call err
244
addl $4,%esp
245
.LC40:
246
pushl 20(%ebp)
247
movl next,%edi
248
sall $4,%edi
249
pushl words+12(%edi)
250
call strcpy
251
addl $8,%esp
252
movl next,%edi
253
leal 1(%edi),%esi
254
movl %esi,next
255
sall $4,%edi
256
leal words(%edi),%edi
257
movl 24(%ebp),%esi
258
movl %edi,(,%esi)
259
movl %edi,%eax
260
.LC27:
261
movl %ebp,%esp
262
popl %edi
263
popl %esi
264
popl %ebx
265
popl %ebp
266
ret
267
.Lf45:
268
.size lookup,.Lf45-lookup
269
.globl tprint
270
.align 16
271
.type tprint,@function
272
tprint:
273
pushl %ebp
274
pushl %ebx
275
pushl %esi
276
pushl %edi
277
movl %esp,%ebp
278
movl 20(%ebp),%edi
279
cmpl $0,%edi
280
je .LC47
281
movl 20(%ebp),%edi
282
pushl 4(%edi)
283
call tprint
284
addl $4,%esp
285
movl 20(%ebp),%edi
286
pushl 12(%edi)
287
pushl (,%edi)
288
pushl $.LC49
289
call printf
290
addl $12,%esp
291
movl 20(%ebp),%edi
292
pushl 8(%edi)
293
call tprint
294
addl $4,%esp
295
.LC47:
296
mov $0,%eax
297
.LC46:
298
movl %ebp,%esp
299
popl %edi
300
popl %esi
301
popl %ebx
302
popl %ebp
303
ret
304
.Lf50:
305
.size tprint,.Lf50-tprint
306
.globl strcmp
307
.align 16
308
.type strcmp,@function
309
strcmp:
310
pushl %ebp
311
pushl %ebx
312
pushl %esi
313
pushl %edi
314
movl %esp,%ebp
315
jmp .LC53
316
.LC52:
317
movl 20(%ebp),%edi
318
leal 1(%edi),%esi
319
movl %esi,20(%ebp)
320
movsbl (,%edi),%edi
321
cmpl $0,%edi
322
jne .LC55
323
mov $0,%eax
324
jmp .LC51
325
.LC55:
326
incl 24(%ebp)
327
.LC53:
328
movl 20(%ebp),%edi
329
movsbl (,%edi),%edi
330
movl 24(%ebp),%esi
331
movsbl (,%esi),%esi
332
cmpl %esi,%edi
333
je .LC52
334
movl 20(%ebp),%edi
335
movsbl (,%edi),%edi
336
cmpl $0,%edi
337
jne .LC57
338
mov $-1,%eax
339
jmp .LC51
340
.LC57:
341
movl 24(%ebp),%edi
342
movsbl (,%edi),%edi
343
cmpl $0,%edi
344
jne .LC59
345
mov $1,%eax
346
jmp .LC51
347
.LC59:
348
movl 20(%ebp),%edi
349
movsbl (,%edi),%edi
350
movl 24(%ebp),%esi
351
movsbl (,%esi),%esi
352
movl %edi,%eax
353
subl %esi,%eax
354
.LC51:
355
movl %ebp,%esp
356
popl %edi
357
popl %esi
358
popl %ebx
359
popl %ebp
360
ret
361
.Lf61:
362
.size strcmp,.Lf61-strcmp
363
.bss
364
.globl next
365
.align 4
366
.type next,@object
367
.size next,4
368
.comm next,4
369
.globl words
370
.align 4
371
.type words,@object
372
.size words,32000
373
.comm words,32000
374
.data
375
.align 1
376
.LC49:
377
.byte 37
378
.byte 100
379
.byte 9
380
.byte 37
381
.byte 115
382
.byte 10
383
.byte 0
384
.align 1
385
.LC43:
386
.byte 111
387
.byte 117
388
.byte 116
389
.byte 32
390
.byte 111
391
.byte 102
392
.byte 32
393
.byte 119
394
.byte 111
395
.byte 114
396
.byte 100
397
.byte 32
398
.byte 115
399
.byte 116
400
.byte 111
401
.byte 114
402
.byte 97
403
.byte 103
404
.byte 101
405
.byte 0
406
.align 1
407
.LC36:
408
.byte 111
409
.byte 117
410
.byte 116
411
.byte 32
412
.byte 111
413
.byte 102
414
.byte 32
415
.byte 110
416
.byte 111
417
.byte 100
418
.byte 101
419
.byte 32
420
.byte 115
421
.byte 116
422
.byte 111
423
.byte 114
424
.byte 97
425
.byte 103
426
.byte 101
427
.byte 0
428
.align 1
429
.LC7:
430
.byte 63
431
.byte 32
432
.byte 37
433
.byte 115
434
.byte 10
435
.byte 0
436
.text
437
.ident "LCC: 4.1"

powered by: WebSVN 2.1.0

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