Skip to content

Latest commit

 

History

History
321 lines (311 loc) · 4.87 KB

synth_i586.asm

File metadata and controls

321 lines (311 loc) · 4.87 KB
 
Nov 10, 2019
Nov 10, 2019
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
; 1 "synth_i586.S"
; 1 "<built-in>"
; 1 "<command line>"
; 1 "synth_i586.S"
; 33 "synth_i586.S"
; 1 "mangle.h" 1
; 13 "mangle.h"
; 1 "config.h" 1
; 14 "mangle.h" 2
; 1 "intsym.h" 1
; 15 "mangle.h" 2
; 34 "synth_i586.S" 2
%include "asm_nasm.inc"
_sym_mangle dct64_i386
_sym_mangle synth_1to1_i586_asm
EXTERN dct64_i386
SECTION .data
ALIGN 8
_LC0:
dd 00h,040dfffc0h
ALIGN 8
_LC1:
dd 00h,0c0e00000h
ALIGN 8
SECTION .text
GLOBAL synth_1to1_i586_asm
synth_1to1_i586_asm:
sub esp,12
push ebp
push edi
push esi
push ebx
mov eax, [esp+32]
mov esi, [esp+40]
mov edi, [esp+48]
mov ebp, [edi]
xor edi,edi
cmp [esp+36],edi
jne L48
dec ebp
and ebp,15
mov edi, [esp+48]
mov [edi],ebp
xor edi,edi
mov ecx, [esp+44]
jmp L49
L48:
add esi,2
mov ecx, [esp+44]
add ecx,2176
L49:
test ebp,1
je L50
mov ebx,ecx
mov [esp+16],ebp
push eax
mov edx, [esp+20]
lea eax, [ebx+edx*4]
push eax
mov eax, [esp+24]
inc eax
and eax,15
lea eax, [eax*4+1088]
add eax,ebx
jmp L74
L50:
lea ebx, [ecx+1088]
lea edx, [ebp+1]
mov [esp+16],edx
push eax
lea eax, [ecx+ebp*4+1092]
push eax
lea eax, [ecx+ebp*4]
L74:
push eax
call dct64_i386
add esp,12
mov edx, [esp+16]
lea edx, [edx*4+0]
mov eax, [esp+52]
add eax,64
mov ecx,eax
sub ecx,edx
mov ebp,16
L55:
fld dword [ecx]
fmul dword [ebx]
fld dword [ecx+4]
fmul dword [ebx+4]
fxch st1
fld dword [ecx+8]
fmul dword [ebx+8]
fxch st2
fsubrp st1,st0
fld dword [ecx+12]
fmul dword [ebx+12]
fxch st2
faddp st1,st0
fld dword [ecx+16]
fmul dword [ebx+16]
fxch st2
fsubrp st1,st0
fld dword [ecx+20]
fmul dword [ebx+20]
fxch st2
faddp st1,st0
fld dword [ecx+24]
fmul dword [ebx+24]
fxch st2
fsubrp st1,st0
fld dword [ecx+28]
fmul dword [ebx+28]
fxch st2
faddp st1,st0
fld dword [ecx+32]
fmul dword [ebx+32]
fxch st2
fsubrp st1,st0
fld dword [ecx+36]
fmul dword [ebx+36]
fxch st2
faddp st1,st0
fld dword [ecx+40]
fmul dword [ebx+40]
fxch st2
fsubrp st1,st0
fld dword [ecx+44]
fmul dword [ebx+44]
fxch st2
faddp st1,st0
fld dword [ecx+48]
fmul dword [ebx+48]
fxch st2
fsubrp st1,st0
fld dword [ecx+52]
fmul dword [ebx+52]
fxch st2
faddp st1,st0
fld dword [ecx+56]
fmul dword [ebx+56]
fxch st2
fsubrp st1,st0
fld dword [ecx+60]
fmul dword [ebx+60]
fxch st2
sub esp,4
faddp st1,st0
fxch st1
fsubrp st1,st0
fistp dword [esp]
pop eax
cmp eax,32767
jg short .l1
cmp eax,-32768
jl short .l2
mov [esi],ax
jmp short .l4
.l1: mov word [esi],32767
jmp short .l3
.l2: mov word [esi],-32768
.l3: inc edi
.l4:
L54:
add ebx,64
sub ecx,-128
add esi,4
dec ebp
jnz L55
fld dword [ecx]
fmul dword [ebx]
fld dword [ecx+8]
fmul dword [ebx+8]
fld dword [ecx+16]
fmul dword [ebx+16]
fxch st2
faddp st1,st0
fld dword [ecx+24]
fmul dword [ebx+24]
fxch st2
faddp st1,st0
fld dword [ecx+32]
fmul dword [ebx+32]
fxch st2
faddp st1,st0
fld dword [ecx+40]
fmul dword [ebx+40]
fxch st2
faddp st1,st0
fld dword [ecx+48]
fmul dword [ebx+48]
fxch st2
faddp st1,st0
fld dword [ecx+56]
fmul dword [ebx+56]
fxch st2
sub esp,4
faddp st1,st0
fxch st1
faddp st1,st0
fistp dword [esp]
pop eax
cmp eax,32767
jg short .l1
cmp eax,-32768
jl short .l2
mov [esi],ax
jmp short .l4
.l1: mov word [esi],32767
jmp short .l3
.l2: mov word [esi],-32768
.l3: inc edi
.l4:
L62:
add ebx,-64
add esi,4
mov edx, [esp+16]
lea ecx, [ecx+edx*8-128]
mov ebp,15
L68:
fld dword [ecx-4]
fchs
fmul dword [ebx]
fld dword [ecx-8]
fmul dword [ebx+4]
fxch st1
fld dword [ecx-12]
fmul dword [ebx+8]
fxch st2
fsubrp st1,st0
fld dword [ecx-16]
fmul dword [ebx+12]
fxch st2
fsubrp st1,st0
fld dword [ecx-20]
fmul dword [ebx+16]
fxch st2
fsubrp st1,st0
fld dword [ecx-24]
fmul dword [ebx+20]
fxch st2
fsubrp st1,st0
fld dword [ecx-28]
fmul dword [ebx+24]
fxch st2
fsubrp st1,st0
fld dword [ecx-32]
fmul dword [ebx+28]
fxch st2
fsubrp st1,st0
fld dword [ecx-36]
fmul dword [ebx+32]
fxch st2
fsubrp st1,st0
fld dword [ecx-40]
fmul dword [ebx+36]
fxch st2
fsubrp st1,st0
fld dword [ecx-44]
fmul dword [ebx+40]
fxch st2
fsubrp st1,st0
fld dword [ecx-48]
fmul dword [ebx+44]
fxch st2
fsubrp st1,st0
fld dword [ecx-52]
fmul dword [ebx+48]
fxch st2
fsubrp st1,st0
fld dword [ecx-56]
fmul dword [ebx+52]
fxch st2
fsubrp st1,st0
fld dword [ecx-60]
fmul dword [ebx+56]
fxch st2
fsubrp st1,st0
fld dword [ecx]
fmul dword [ebx+60]
fxch st2
sub esp,4
fsubrp st1,st0
fxch st1
fsubrp st1,st0
fistp dword [esp]
pop eax
cmp eax,32767
jg short .l1
cmp eax,-32768
jl short .l2
mov [esi],ax
jmp short .l4
.l1: mov word [esi],32767
jmp short .l3
.l2: mov word [esi],-32768
.l3: inc edi
.l4:
L67:
add ebx,-64
add ecx,-128
add esi,4
dec ebp
jnz L68
mov eax,edi
pop ebx
pop esi
pop edi
pop ebp
add esp,12
ret
; 343 "synth_i586.S"