forked from oevtushe/Corewar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathslave1.s
147 lines (126 loc) · 1.87 KB
/
slave1.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#by zaz, it's not very good, but what did you expect, rainbowdash is way better
#2013
.name "slave"
.comment "i have been born for this job"
entry:
fork %:coregeni
st r1, 6
live %42
fork %:torpgeni
st r1, 6
live %42
fork %:avdefgeni
ardeftgt:
ardefgeni:
st r1, 6
ardefgen:
live %213904
fork %:ardefgen
ardefinit:
sti r1, %:ardefl1, %1
st r1, 6
live %43123
sti r1, %:ardefchk, %1
ld %-6, r2
ld %-6, r3
ld %150994953, r4
ld %-186, r5
ardefwrite:
ardefl1:
live %295423
sti r4, %:ardeftgt, r2
add r2, r3, r2
sti r4, %:ardeftgt, r2
add r2, r3, r2
ardefchk:
live %3940641
xor r2, r5, r15
zjmp %:ardefinit
ardefloop:
ld %0, r16
zjmp %:ardefwrite
coregeni:
st r1, 6
coregen:
live %123012
fork %:coregen
coreinit:
st r1, 58
st r1, 58
st r1, 58
st r1, 58
st r1, 58
st r1, 58
st r1, 58
st r1, 58
st r1, 58
st r1, 58
ld %0, r16
corelive:
live %985341
live %985341
live %985341
live %985341
live %985341
live %985341
live %985341
live %985341
live %985341
live %985341
zjmp %:corelive
avdefgeni:
st r1, 6
avdefgen:
live %213904
fork %:avdefgen
avdefinit:
sti r1, %:avdefl1, %1
st r1, 6
live %43123
sti r1, %:avdefchk, %1
ld %0, r2
ld %6, r3
ld %150994953, r4
ld %180, r5
avdefwrite:
avdefl1:
live %295423
sti r4, %:avdeftgt, r2
add r2, r3, r2
sti r4, %:avdeftgt, r2
add r2, r3, r2
avdefchk:
live %3940641
xor r2, r5, r15
zjmp %:avdefinit
avdefloop:
ld %0, r16
zjmp %:avdefwrite
torpgeni:
st r1, 6
torpgen:
live %96824
fork %:torpgen
torpinit:
ld %0, r2
ld %4, r3
ld %96, r5
sti r1, %:torpchk, %1
st r1, 6
torpwrite:
torpl1:
live %8008135
ldi %:torpinit, r2, r4
sti r4, %400, r2
add r2, r3, r2
ldi %:torpinit, r2, r4
sti r4, %383, r2
add r2, r3, r2
torpchk:
live %89523
xor r2, r5, r15
zjmp %362
torploop:
ld %0, r15
zjmp %:torpwrite
avdeftgt: