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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [lcc/] [sparc/] [solaris/] [tst/] [8q.sbk] - Blame information for rev 146

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

Line No. Rev Author Line
1 4 hellwig
.global main
2
.section ".text"
3
.align 4
4
main:
5
save %sp,-96,%sp
6
mov %g0,%i5
7
.L2:
8
sll %i5,2,%i4
9
set 1,%i3
10
set down,%i2
11
st %i3,[%i4+%i2]
12
set up,%i2
13
st %i3,[%i4+%i2]
14
.L3:
15
add %i5,1,%i5
16
cmp %i5,15; bl .L2; nop
17
mov %g0,%i5
18
.L6:
19
sll %i5,2,%i4
20
set rows,%i3
21
set 1,%i2
22
st %i2,[%i4+%i3]
23
.L7:
24
add %i5,1,%i5
25
cmp %i5,8; bl .L6; nop
26
mov %g0,%o0
27
call queens; nop
28
mov %g0,%i0
29
.L1:
30
ret; restore
31
.type main,#function
32
.size main,.-main
33
.global queens
34
.align 4
35
queens:
36
save %sp,-96,%sp
37
mov %g0,%i5
38
.L11:
39
sll %i5,2,%i3
40
set rows,%i2
41
ld [%i3+%i2],%i3
42
cmp %i3,%g0; be .L15; nop
43
sub %i5,%i0,%i3
44
sll %i3,2,%i3
45
set up+28,%i2
46
ld [%i3+%i2],%i3
47
cmp %i3,%g0; be .L15; nop
48
add %i5,%i0,%i3
49
sll %i3,2,%i3
50
set down,%i2
51
ld [%i3+%i2],%i3
52
cmp %i3,%g0; be .L15; nop
53
add %i5,%i0,%i3
54
sll %i3,2,%i3
55
set down,%i2
56
st %g0,[%i3+%i2]
57
sub %i5,%i0,%i3
58
sll %i3,2,%i3
59
set up+28,%i2
60
st %g0,[%i3+%i2]
61
sll %i5,2,%i3
62
set rows,%i2
63
st %g0,[%i3+%i2]
64
sll %i0,2,%i4
65
set x,%i3
66
st %i5,[%i4+%i3]
67
cmp %i0,7; bne .L19; nop
68
call print; nop
69
ba .L20; nop
70
.L19:
71
add %i0,1,%o0
72
call queens; nop
73
.L20:
74
set 1,%i4
75
add %i5,%i0,%i3
76
sll %i3,2,%i3
77
set down,%i2
78
st %i4,[%i3+%i2]
79
sub %i5,%i0,%i3
80
sll %i3,2,%i3
81
set up+28,%i2
82
st %i4,[%i3+%i2]
83
sll %i5,2,%i3
84
set rows,%i2
85
st %i4,[%i3+%i2]
86
.L15:
87
.L12:
88
add %i5,1,%i5
89
cmp %i5,8; bl .L11; nop
90
mov %g0,%i0
91
.L10:
92
ret; restore
93
.type queens,#function
94
.size queens,.-queens
95
.global print
96
.align 4
97
print:
98
save %sp,-96,%sp
99
mov %g0,%i5
100
.L23:
101
set .L27,%o0
102
sll %i5,2,%i4
103
set x,%i3
104
ld [%i4+%i3],%i4
105
add %i4,49,%o1
106
call printf; nop
107
.L24:
108
add %i5,1,%i5
109
cmp %i5,8; bl .L23; nop
110
set .L28,%o0
111
call printf; nop
112
mov %g0,%i0
113
.L22:
114
ret; restore
115
.type print,#function
116
.size print,.-print
117
.section ".bss"
118
.global x
119
.type x,#object
120
.size x,32
121
.common x,32,4
122
.global rows
123
.type rows,#object
124
.size rows,32
125
.common rows,32,4
126
.global down
127
.type down,#object
128
.size down,60
129
.common down,60,4
130
.global up
131
.type up,#object
132
.size up,60
133
.common up,60,4
134
.section ".rodata"
135
.align 1
136
.L28:
137
.byte 10
138
.byte 0
139
.align 1
140
.L27:
141
.byte 37
142
.byte 99
143
.byte 32
144
.byte 0

powered by: WebSVN 2.1.0

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