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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [lcc/] [x86/] [linux/] [tst/] [8q.sbk] - Blame information for rev 41

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 $4,%esp
12
movl $0,-4(%ebp)
13
.LC2:
14
movl -4(%ebp),%edi
15
leal (,%edi,4),%edi
16
movl $1,down(%edi)
17
movl $1,up(%edi)
18
.LC3:
19
incl -4(%ebp)
20
cmpl $15,-4(%ebp)
21
jl .LC2
22
movl $0,-4(%ebp)
23
.LC6:
24
movl -4(%ebp),%edi
25
movl $1,rows(,%edi,4)
26
.LC7:
27
incl -4(%ebp)
28
cmpl $8,-4(%ebp)
29
jl .LC6
30
pushl $0
31
call queens
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
.Lf10:
42
.size main,.Lf10-main
43
.globl queens
44
.align 16
45
.type queens,@function
46
queens:
47
pushl %ebp
48
pushl %ebx
49
pushl %esi
50
pushl %edi
51
movl %esp,%ebp
52
subl $4,%esp
53
movl $0,-4(%ebp)
54
.LC12:
55
movl -4(%ebp),%edi
56
cmpl $0,rows(,%edi,4)
57
je .LC16
58
movl 20(%ebp),%esi
59
movl %edi,%ebx
60
subl %esi,%ebx
61
cmpl $0,up+28(,%ebx,4)
62
je .LC16
63
leal (%esi,%edi),%edi
64
cmpl $0,down(,%edi,4)
65
je .LC16
66
movl -4(%ebp),%edi
67
movl 20(%ebp),%esi
68
leal (%esi,%edi),%ebx
69
movl $0,down(,%ebx,4)
70
movl %edi,%ebx
71
subl %esi,%ebx
72
movl $0,up+28(,%ebx,4)
73
movl $0,rows(,%edi,4)
74
movl 20(%ebp),%edi
75
movl -4(%ebp),%esi
76
movl %esi,x(,%edi,4)
77
cmpl $7,20(%ebp)
78
jne .LC20
79
call print
80
jmp .LC21
81
.LC20:
82
movl 20(%ebp),%edi
83
leal 1(%edi),%edi
84
pushl %edi
85
call queens
86
addl $4,%esp
87
.LC21:
88
movl -4(%ebp),%edi
89
movl 20(%ebp),%esi
90
leal (%esi,%edi),%ebx
91
movl $1,down(,%ebx,4)
92
movl %edi,%ebx
93
subl %esi,%ebx
94
movl $1,up+28(,%ebx,4)
95
movl $1,rows(,%edi,4)
96
.LC16:
97
.LC13:
98
incl -4(%ebp)
99
cmpl $8,-4(%ebp)
100
jl .LC12
101
mov $0,%eax
102
.LC11:
103
movl %ebp,%esp
104
popl %edi
105
popl %esi
106
popl %ebx
107
popl %ebp
108
ret
109
.Lf23:
110
.size queens,.Lf23-queens
111
.globl print
112
.align 16
113
.type print,@function
114
print:
115
pushl %ebp
116
pushl %ebx
117
pushl %esi
118
pushl %edi
119
movl %esp,%ebp
120
subl $4,%esp
121
movl $0,-4(%ebp)
122
.LC25:
123
movl -4(%ebp),%edi
124
movl x(,%edi,4),%edi
125
leal 49(%edi),%edi
126
pushl %edi
127
pushl $.LC29
128
call printf
129
addl $8,%esp
130
.LC26:
131
incl -4(%ebp)
132
cmpl $8,-4(%ebp)
133
jl .LC25
134
pushl $.LC30
135
call printf
136
addl $4,%esp
137
mov $0,%eax
138
.LC24:
139
movl %ebp,%esp
140
popl %edi
141
popl %esi
142
popl %ebx
143
popl %ebp
144
ret
145
.Lf31:
146
.size print,.Lf31-print
147
.bss
148
.globl x
149
.align 4
150
.type x,@object
151
.size x,32
152
.comm x,32
153
.globl rows
154
.align 4
155
.type rows,@object
156
.size rows,32
157
.comm rows,32
158
.globl down
159
.align 4
160
.type down,@object
161
.size down,60
162
.comm down,60
163
.globl up
164
.align 4
165
.type up,@object
166
.size up,60
167
.comm up,60
168
.data
169
.align 1
170
.LC30:
171
.byte 10
172
.byte 0
173
.align 1
174
.LC29:
175
.byte 37
176
.byte 99
177
.byte 32
178
.byte 0
179
.text
180
.ident "LCC: 4.1"

powered by: WebSVN 2.1.0

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