-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparallel_clscr.src
More file actions
216 lines (207 loc) · 2.79 KB
/
parallel_clscr.src
File metadata and controls
216 lines (207 loc) · 2.79 KB
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
comp
mul r1 !6 !8
mul r2 r1 !2
mul r3 r1 !3
add 0 !r0 r1
add 8 !r1 r1
add 10 !r2 r1
add 18 !r3 r1
add 20 !r0 r2
add 28 !r1 r2
add 30 !r2 r2
add 38 !r3 r2
add 40 !r0 r3
add 48 !r1 r3
add 50 !r2 r3
add 58 !r3 r3
mov 60 !r0
mov 68 !r1
mov 70 !r2
mov 78 !r3
run
bind r01 0
bind r11 8
bind r21 10
bind r31 18
bind r02 20
bind r12 28
bind r22 30
bind r32 38
bind r03 40
bind r13 48
bind r23 50
bind r33 58
bind save_r0 60
bind save_r1 68
bind save_r2 70
bind save_r3 78
pass
movw 0 !literal_bytes
mov 8 r1
bind loop ip
cmp [r0] 0
jne next
add r0 r0 !8
bind change ip
cmp [r0] 0
jeq break
movw [r1] mov add r1 r1 !8
movw [r1] \[ add r1 r1 !8
movw [r1] !r1 add r1 r1 !8
movw [r1] \] add r1 r1 !8
movw [r1] \[ add r1 r1 !8
movw [r1] [r0] add r1 r1 !8
movw [r1] \] add r1 r1 !8
add r0 r0 !8
jmp change
bind break ip
add r0 r0 !8
cmp r0 8
jeq exit
jmp loop
bind next ip
mov [r1] [r0]
add r0 r0 !8
add r1 r1 !8
cmp r0 8
jne loop
bind exit ip
mov r0 !1
int
end
pass
mov 0 !core_agnostic
mov 8 r1
bind loop ip
cmp [r0] 0
jne next
add r0 r0 !8
mov r2 r1
bytes
bind core0 ip
bytes
bind inner ip
cmp r0 0
jeq core1
mov [r1] [r0]
add r0 r0 !8
mov r1 r1 !8
jmp inner
bind core1 ip
mov r0 r2
bytes
bind core1 ip
bind r0 !r01
bind r1 !r11
bind r2 !r21
bind r3 !r31
bytes
bind inner ip
cmp r0 0
jeq core2
mov [r1] [r0]
add r0 r0 !8
mov r1 r1 !8
jmp inner
bind core2 ip
mov r0 r2
bytes
bind core2 ip
bind r0 !r02
bind r1 !r12
bind r2 !r22
bind r3 !r32
bytes
bind inner ip
cmp r0 0
jeq core3
mov [r1] [r0]
add r0 r0 !8
mov r1 r1 !8
jmp inner
bind core3 ip
mov r0 r2
bytes
bind core3 ip
bind r0 !r03
bind r1 !r13
bind r2 !r23
bind r3 !r33
bytes
bind inner ip
cmp r0 0
jeq break
jmp inner
bind break ip
bytes
bind r0 save_r0
bind r1 save_r1
bind r2 save_r2
bind r3 save_r3
bytes
add r0 r0 !8
cmp r0 !8
jeq exit
jmp loop
bind next ip
mov [r1] [r0]
add r0 r0 !8
add r1 r1 !8
cmp r0 8
jne loop
bind exit ip
mov r0 !1
int
end
mov r0 !9
mov r1 two
int
mov r0 !9
mov r1 three
int
mov r0 !9
mov r1 four
int
jmp one
core_agnostic
bind worker ip
bind loop ip
cmp r2 !0
jne skip
mov r0 !0
int
bind skip ip
mov r0 r2
bind inner ip
cmp r0 r1
jge loop
movw [r0] !ff808080ff808080
add r0 r0 !8
jmp inner
unbind loop
unbind skip
unbind inner
core_agnostic
bind one ip
mov r1 !mbm
div r1 r1 !4
mov r2 !0
jmp core0
bind two ip
mov r1 !mbm
div r1 r1 !4
mov r2 r1
mul r1 r1 !2
jmp core1
bind three ip
mov r1 !mbm
div r1 r1 !4
mul r2 r1 !2
mul r1 r1 !3
jmp core2
bind four ip
mov r1 !mbm
div r1 r1 !4
mul r2 r1 !3
mov r1 !mbm
jmp core3