annotate mp3lib/decode_i586.c @ 23254:a54bbe610410

10l syntax error
author diego
date Tue, 08 May 2007 17:46:04 +0000
parents 8092494fc92c
children d986b47f1451
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15167
07e7a572bd84 Mark modified imported files as such to comply with (L)GPL ¡ø2a.
diego
parents: 12945
diff changeset
1 /*
18783
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 16989
diff changeset
2 * Modified for use with MPlayer, for details see the changelog at
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 16989
diff changeset
3 * http://svn.mplayerhq.hu/mplayer/trunk/
15167
07e7a572bd84 Mark modified imported files as such to comply with (L)GPL ¡ø2a.
diego
parents: 12945
diff changeset
4 * $Id$
07e7a572bd84 Mark modified imported files as such to comply with (L)GPL ¡ø2a.
diego
parents: 12945
diff changeset
5 */
07e7a572bd84 Mark modified imported files as such to comply with (L)GPL ¡ø2a.
diego
parents: 12945
diff changeset
6
4147
nick
parents:
diff changeset
7 /*
nick
parents:
diff changeset
8 * mpg123_synth_1to1 works the same way as the c version of this
nick
parents:
diff changeset
9 * file. only two types of changes have been made:
nick
parents:
diff changeset
10 * - reordered floating point instructions to
nick
parents:
diff changeset
11 * prevent pipline stalls
nick
parents:
diff changeset
12 * - made WRITE_SAMPLE use integer instead of
nick
parents:
diff changeset
13 * (slower) floating point
nick
parents:
diff changeset
14 * all kinds of x86 processors should benefit from these
nick
parents:
diff changeset
15 * modifications.
nick
parents:
diff changeset
16 *
nick
parents:
diff changeset
17 * useful sources of information on optimizing x86 code include:
nick
parents:
diff changeset
18 *
nick
parents:
diff changeset
19 * Intel Architecture Optimization Manual
nick
parents:
diff changeset
20 * http://www.intel.com/design/pentium/manuals/242816.htm
nick
parents:
diff changeset
21 *
nick
parents:
diff changeset
22 * Cyrix 6x86 Instruction Set Summary
nick
parents:
diff changeset
23 * ftp://ftp.cyrix.com/6x86/6x-dbch6.pdf
nick
parents:
diff changeset
24 *
nick
parents:
diff changeset
25 * AMD-K5 Processor Software Development
nick
parents:
diff changeset
26 * http://www.amd.com/products/cpg/techdocs/appnotes/20007e.pdf
nick
parents:
diff changeset
27 *
nick
parents:
diff changeset
28 * Stefan Bieschewski <stb@acm.org>
nick
parents:
diff changeset
29 *
nick
parents:
diff changeset
30 * $Id$
nick
parents:
diff changeset
31 */
16989
e7a129082fda Unify include paths, -I.. is in CFLAGS.
diego
parents: 16858
diff changeset
32 #include "config.h"
e7a129082fda Unify include paths, -I.. is in CFLAGS.
diego
parents: 16858
diff changeset
33 #include "mangle.h"
4147
nick
parents:
diff changeset
34 #define real float /* ugly - but only way */
nick
parents:
diff changeset
35
12945
e6b756046bf5 avoid outoptimization of static variables patch by ismail d«Ónmez <ismail.donmez at gmail.com>
faust3
parents: 12928
diff changeset
36 static long attribute_used buffs[1088]={0};
12292
114f3d149324 attribute_used for gcc3.4
alex
parents: 8560
diff changeset
37 static long attribute_used bo=1;
12945
e6b756046bf5 avoid outoptimization of static variables patch by ismail d«Ónmez <ismail.donmez at gmail.com>
faust3
parents: 12928
diff changeset
38 static long attribute_used saved_ebp=0;
4147
nick
parents:
diff changeset
39
nick
parents:
diff changeset
40 int synth_1to1_pent(real *bandPtr, int channel, short *samples)
nick
parents:
diff changeset
41 {
nick
parents:
diff changeset
42 real tmp[3];
nick
parents:
diff changeset
43 register int retval;
nick
parents:
diff changeset
44 __asm __volatile(
8543
60fe896e437c decode_i586.c version uses %ebp for its own use, so:
arpi
parents: 4246
diff changeset
45 " movl %%ebp,"MANGLE(saved_ebp)"\n\t"
4147
nick
parents:
diff changeset
46 " movl %1,%%eax\n\t"/*bandPtr*/
nick
parents:
diff changeset
47 " movl %3,%%esi\n\t"
nick
parents:
diff changeset
48 " xorl %%edi,%%edi\n\t"
4246
3f677202418b mangling in mp3lib + stdcall undefined fix with cygwin
atmos4
parents: 4147
diff changeset
49 " movl "MANGLE(bo)",%%ebp\n\t"
4147
nick
parents:
diff changeset
50 " cmpl %%edi,%2\n\t"
nick
parents:
diff changeset
51 " jne .L48\n\t"
nick
parents:
diff changeset
52 " decl %%ebp\n\t"
nick
parents:
diff changeset
53 " andl $15,%%ebp\n\t"
4246
3f677202418b mangling in mp3lib + stdcall undefined fix with cygwin
atmos4
parents: 4147
diff changeset
54 " movl %%ebp,"MANGLE(bo)"\n\t"
3f677202418b mangling in mp3lib + stdcall undefined fix with cygwin
atmos4
parents: 4147
diff changeset
55 " movl $"MANGLE(buffs)",%%ecx\n\t"
4147
nick
parents:
diff changeset
56 " jmp .L49\n\t"
nick
parents:
diff changeset
57 ".L48:\n\t"
nick
parents:
diff changeset
58 " addl $2,%%esi\n\t"
4246
3f677202418b mangling in mp3lib + stdcall undefined fix with cygwin
atmos4
parents: 4147
diff changeset
59 " movl $"MANGLE(buffs)"+2176,%%ecx\n\t"
4147
nick
parents:
diff changeset
60 ".L49:\n\t"
nick
parents:
diff changeset
61 " testl $1,%%ebp\n\t"
nick
parents:
diff changeset
62 " je .L50\n\t"
nick
parents:
diff changeset
63 " movl %%ecx,%%ebx\n\t"
nick
parents:
diff changeset
64 " movl %%ebp,%4\n\t"
nick
parents:
diff changeset
65 " pushl %%eax\n\t"
nick
parents:
diff changeset
66 " movl 4+%4,%%edx\n\t"
nick
parents:
diff changeset
67 " leal (%%ebx,%%edx,4),%%eax\n\t"
nick
parents:
diff changeset
68 " pushl %%eax\n\t"
nick
parents:
diff changeset
69 " movl 8+%4,%%eax\n\t"
nick
parents:
diff changeset
70 " incl %%eax\n\t"
nick
parents:
diff changeset
71 " andl $15,%%eax\n\t"
nick
parents:
diff changeset
72 " leal 1088(,%%eax,4),%%eax\n\t"
nick
parents:
diff changeset
73 " addl %%ebx,%%eax\n\t"
nick
parents:
diff changeset
74 " jmp .L74\n\t"
nick
parents:
diff changeset
75 ".L50:\n\t"
nick
parents:
diff changeset
76 " leal 1088(%%ecx),%%ebx\n\t"
nick
parents:
diff changeset
77 " leal 1(%%ebp),%%edx\n\t"
nick
parents:
diff changeset
78 " movl %%edx,%4\n\t"
nick
parents:
diff changeset
79 " pushl %%eax\n\t"
nick
parents:
diff changeset
80 " leal 1092(%%ecx,%%ebp,4),%%eax\n\t"
nick
parents:
diff changeset
81 " pushl %%eax\n\t"
nick
parents:
diff changeset
82 " leal (%%ecx,%%ebp,4),%%eax\n\t"
nick
parents:
diff changeset
83 ".L74:\n\t"
nick
parents:
diff changeset
84 " pushl %%eax\n\t"
16858
daf4e680d116 10l broken asm crap needs an external name
rfelker
parents: 15167
diff changeset
85 " call "MANGLE(mp3lib_dct64)"\n\t"
4147
nick
parents:
diff changeset
86 " addl $12,%%esp\n\t"
nick
parents:
diff changeset
87 " movl %4,%%edx\n\t"
nick
parents:
diff changeset
88 " leal 0(,%%edx,4),%%edx\n\t"
8560
1320f1b3229d fixing that f*cking linker 'bug' e.g. naming config with libmp3lame
alex
parents: 8543
diff changeset
89 " movl $"MANGLE(mp3lib_decwin)"+64,%%eax\n\t"
4147
nick
parents:
diff changeset
90 " movl %%eax,%%ecx\n\t"
nick
parents:
diff changeset
91 " subl %%edx,%%ecx\n\t"
nick
parents:
diff changeset
92 " movl $16,%%ebp\n\t"
nick
parents:
diff changeset
93 ".L55:\n\t"
nick
parents:
diff changeset
94 " flds (%%ecx)\n\t"
nick
parents:
diff changeset
95 " fmuls (%%ebx)\n\t"
nick
parents:
diff changeset
96 " flds 4(%%ecx)\n\t"
nick
parents:
diff changeset
97 " fmuls 4(%%ebx)\n\t"
nick
parents:
diff changeset
98 " fxch %%st(1)\n\t"
nick
parents:
diff changeset
99 " flds 8(%%ecx)\n\t"
nick
parents:
diff changeset
100 " fmuls 8(%%ebx)\n\t"
nick
parents:
diff changeset
101 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
102 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
103 " flds 12(%%ecx)\n\t"
nick
parents:
diff changeset
104 " fmuls 12(%%ebx)\n\t"
nick
parents:
diff changeset
105 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
106 " faddp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
107 " flds 16(%%ecx)\n\t"
nick
parents:
diff changeset
108 " fmuls 16(%%ebx)\n\t"
nick
parents:
diff changeset
109 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
110 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
111 " flds 20(%%ecx)\n\t"
nick
parents:
diff changeset
112 " fmuls 20(%%ebx)\n\t"
nick
parents:
diff changeset
113 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
114 " faddp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
115 " flds 24(%%ecx)\n\t"
nick
parents:
diff changeset
116 " fmuls 24(%%ebx)\n\t"
nick
parents:
diff changeset
117 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
118 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
119 " flds 28(%%ecx)\n\t"
nick
parents:
diff changeset
120 " fmuls 28(%%ebx)\n\t"
nick
parents:
diff changeset
121 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
122 " faddp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
123 " flds 32(%%ecx)\n\t"
nick
parents:
diff changeset
124 " fmuls 32(%%ebx)\n\t"
nick
parents:
diff changeset
125 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
126 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
127 " flds 36(%%ecx)\n\t"
nick
parents:
diff changeset
128 " fmuls 36(%%ebx)\n\t"
nick
parents:
diff changeset
129 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
130 " faddp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
131 " flds 40(%%ecx)\n\t"
nick
parents:
diff changeset
132 " fmuls 40(%%ebx)\n\t"
nick
parents:
diff changeset
133 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
134 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
135 " flds 44(%%ecx)\n\t"
nick
parents:
diff changeset
136 " fmuls 44(%%ebx)\n\t"
nick
parents:
diff changeset
137 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
138 " faddp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
139 " flds 48(%%ecx)\n\t"
nick
parents:
diff changeset
140 " fmuls 48(%%ebx)\n\t"
nick
parents:
diff changeset
141 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
142 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
143 " flds 52(%%ecx)\n\t"
nick
parents:
diff changeset
144 " fmuls 52(%%ebx)\n\t"
nick
parents:
diff changeset
145 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
146 " faddp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
147 " flds 56(%%ecx)\n\t"
nick
parents:
diff changeset
148 " fmuls 56(%%ebx)\n\t"
nick
parents:
diff changeset
149 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
150 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
151 " flds 60(%%ecx)\n\t"
nick
parents:
diff changeset
152 " fmuls 60(%%ebx)\n\t"
nick
parents:
diff changeset
153 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
154 " subl $4,%%esp\n\t"
nick
parents:
diff changeset
155 " faddp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
156 " fxch %%st(1)\n\t"
nick
parents:
diff changeset
157 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
158 " fistpl (%%esp)\n\t"
nick
parents:
diff changeset
159 " popl %%eax\n\t"
nick
parents:
diff changeset
160 " cmpl $32767,%%eax\n\t"
nick
parents:
diff changeset
161 " jg 1f\n\t"
nick
parents:
diff changeset
162 " cmpl $-32768,%%eax\n\t"
nick
parents:
diff changeset
163 " jl 2f\n\t"
nick
parents:
diff changeset
164 " movw %%ax,(%%esi)\n\t"
nick
parents:
diff changeset
165 " jmp 4f\n\t"
nick
parents:
diff changeset
166 "1: movw $32767,(%%esi)\n\t"
nick
parents:
diff changeset
167 " jmp 3f\n\t"
nick
parents:
diff changeset
168 "2: movw $-32768,(%%esi)\n\t"
nick
parents:
diff changeset
169 "3: incl %%edi\n\t"
nick
parents:
diff changeset
170 "4:\n\t"
nick
parents:
diff changeset
171 ".L54:\n\t"
nick
parents:
diff changeset
172 " addl $64,%%ebx\n\t"
nick
parents:
diff changeset
173 " subl $-128,%%ecx\n\t"
nick
parents:
diff changeset
174 " addl $4,%%esi\n\t"
nick
parents:
diff changeset
175 " decl %%ebp\n\t"
nick
parents:
diff changeset
176 " jnz .L55\n\t"
nick
parents:
diff changeset
177 " flds (%%ecx)\n\t"
nick
parents:
diff changeset
178 " fmuls (%%ebx)\n\t"
nick
parents:
diff changeset
179 " flds 8(%%ecx)\n\t"
nick
parents:
diff changeset
180 " fmuls 8(%%ebx)\n\t"
nick
parents:
diff changeset
181 " flds 16(%%ecx)\n\t"
nick
parents:
diff changeset
182 " fmuls 16(%%ebx)\n\t"
nick
parents:
diff changeset
183 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
184 " faddp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
185 " flds 24(%%ecx)\n\t"
nick
parents:
diff changeset
186 " fmuls 24(%%ebx)\n\t"
nick
parents:
diff changeset
187 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
188 " faddp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
189 " flds 32(%%ecx)\n\t"
nick
parents:
diff changeset
190 " fmuls 32(%%ebx)\n\t"
nick
parents:
diff changeset
191 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
192 " faddp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
193 " flds 40(%%ecx)\n\t"
nick
parents:
diff changeset
194 " fmuls 40(%%ebx)\n\t"
nick
parents:
diff changeset
195 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
196 " faddp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
197 " flds 48(%%ecx)\n\t"
nick
parents:
diff changeset
198 " fmuls 48(%%ebx)\n\t"
nick
parents:
diff changeset
199 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
200 " faddp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
201 " flds 56(%%ecx)\n\t"
nick
parents:
diff changeset
202 " fmuls 56(%%ebx)\n\t"
nick
parents:
diff changeset
203 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
204 " subl $4,%%esp\n\t"
nick
parents:
diff changeset
205 " faddp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
206 " fxch %%st(1)\n\t"
nick
parents:
diff changeset
207 " faddp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
208 " fistpl (%%esp)\n\t"
nick
parents:
diff changeset
209 " popl %%eax\n\t"
nick
parents:
diff changeset
210 " cmpl $32767,%%eax\n\t"
nick
parents:
diff changeset
211 " jg 1f\n\t"
nick
parents:
diff changeset
212 " cmpl $-32768,%%eax\n\t"
nick
parents:
diff changeset
213 " jl 2f\n\t"
nick
parents:
diff changeset
214 " movw %%ax,(%%esi)\n\t"
nick
parents:
diff changeset
215 " jmp 4f\n\t"
nick
parents:
diff changeset
216 "1: movw $32767,(%%esi)\n\t"
nick
parents:
diff changeset
217 " jmp 3f\n\t"
nick
parents:
diff changeset
218 "2: movw $-32768,(%%esi)\n\t"
nick
parents:
diff changeset
219 "3: incl %%edi\n\t"
nick
parents:
diff changeset
220 "4:\n\t"
nick
parents:
diff changeset
221 ".L62:\n\t"
nick
parents:
diff changeset
222 " addl $-64,%%ebx\n\t"
nick
parents:
diff changeset
223 " addl $4,%%esi\n\t"
nick
parents:
diff changeset
224 " movl %4,%%edx\n\t"
nick
parents:
diff changeset
225 " leal -128(%%ecx,%%edx,8),%%ecx\n\t"
nick
parents:
diff changeset
226 " movl $15,%%ebp\n\t"
nick
parents:
diff changeset
227 ".L68:\n\t"
nick
parents:
diff changeset
228 " flds -4(%%ecx)\n\t"
nick
parents:
diff changeset
229 " fchs\n\t"
nick
parents:
diff changeset
230 " fmuls (%%ebx)\n\t"
nick
parents:
diff changeset
231 " flds -8(%%ecx)\n\t"
nick
parents:
diff changeset
232 " fmuls 4(%%ebx)\n\t"
nick
parents:
diff changeset
233 " fxch %%st(1)\n\t"
nick
parents:
diff changeset
234 " flds -12(%%ecx)\n\t"
nick
parents:
diff changeset
235 " fmuls 8(%%ebx)\n\t"
nick
parents:
diff changeset
236 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
237 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
238 " flds -16(%%ecx)\n\t"
nick
parents:
diff changeset
239 " fmuls 12(%%ebx)\n\t"
nick
parents:
diff changeset
240 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
241 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
242 " flds -20(%%ecx)\n\t"
nick
parents:
diff changeset
243 " fmuls 16(%%ebx)\n\t"
nick
parents:
diff changeset
244 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
245 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
246 " flds -24(%%ecx)\n\t"
nick
parents:
diff changeset
247 " fmuls 20(%%ebx)\n\t"
nick
parents:
diff changeset
248 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
249 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
250 " flds -28(%%ecx)\n\t"
nick
parents:
diff changeset
251 " fmuls 24(%%ebx)\n\t"
nick
parents:
diff changeset
252 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
253 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
254 " flds -32(%%ecx)\n\t"
nick
parents:
diff changeset
255 " fmuls 28(%%ebx)\n\t"
nick
parents:
diff changeset
256 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
257 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
258 " flds -36(%%ecx)\n\t"
nick
parents:
diff changeset
259 " fmuls 32(%%ebx)\n\t"
nick
parents:
diff changeset
260 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
261 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
262 " flds -40(%%ecx)\n\t"
nick
parents:
diff changeset
263 " fmuls 36(%%ebx)\n\t"
nick
parents:
diff changeset
264 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
265 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
266 " flds -44(%%ecx)\n\t"
nick
parents:
diff changeset
267 " fmuls 40(%%ebx)\n\t"
nick
parents:
diff changeset
268 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
269 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
270 " flds -48(%%ecx)\n\t"
nick
parents:
diff changeset
271 " fmuls 44(%%ebx)\n\t"
nick
parents:
diff changeset
272 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
273 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
274 " flds -52(%%ecx)\n\t"
nick
parents:
diff changeset
275 " fmuls 48(%%ebx)\n\t"
nick
parents:
diff changeset
276 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
277 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
278 " flds -56(%%ecx)\n\t"
nick
parents:
diff changeset
279 " fmuls 52(%%ebx)\n\t"
nick
parents:
diff changeset
280 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
281 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
282 " flds -60(%%ecx)\n\t"
nick
parents:
diff changeset
283 " fmuls 56(%%ebx)\n\t"
nick
parents:
diff changeset
284 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
285 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
286 " flds (%%ecx)\n\t"
nick
parents:
diff changeset
287 " fmuls 60(%%ebx)\n\t"
nick
parents:
diff changeset
288 " fxch %%st(2)\n\t"
nick
parents:
diff changeset
289 " subl $4,%%esp\n\t"
nick
parents:
diff changeset
290 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
291 " fxch %%st(1)\n\t"
nick
parents:
diff changeset
292 " fsubrp %%st,%%st(1)\n\t"
nick
parents:
diff changeset
293 " fistpl (%%esp)\n\t"
nick
parents:
diff changeset
294 " popl %%eax\n\t"
nick
parents:
diff changeset
295 " cmpl $32767,%%eax\n\t"
nick
parents:
diff changeset
296 " jg 1f\n\t"
nick
parents:
diff changeset
297 " cmpl $-32768,%%eax\n\t"
nick
parents:
diff changeset
298 " jl 2f\n\t"
nick
parents:
diff changeset
299 " movw %%ax,(%%esi)\n\t"
nick
parents:
diff changeset
300 " jmp 4f\n\t"
nick
parents:
diff changeset
301 "1: movw $32767,(%%esi)\n\t"
nick
parents:
diff changeset
302 " jmp 3f\n\t"
nick
parents:
diff changeset
303 "2: movw $-32768,(%%esi)\n\t"
nick
parents:
diff changeset
304 "3: incl %%edi\n\t"
nick
parents:
diff changeset
305 "4:\n\t"
nick
parents:
diff changeset
306 ".L67:\n\t"
nick
parents:
diff changeset
307 " addl $-64,%%ebx\n\t"
nick
parents:
diff changeset
308 " addl $-128,%%ecx\n\t"
nick
parents:
diff changeset
309 " addl $4,%%esi\n\t"
nick
parents:
diff changeset
310 " decl %%ebp\n\t"
nick
parents:
diff changeset
311 " jnz .L68\n\t"
nick
parents:
diff changeset
312 " movl %%edi,%%eax\n\t"
8543
60fe896e437c decode_i586.c version uses %ebp for its own use, so:
arpi
parents: 4246
diff changeset
313 " movl "MANGLE(saved_ebp)",%%ebp\n\t"
4147
nick
parents:
diff changeset
314 :"=a"(retval)
nick
parents:
diff changeset
315 :"m"(bandPtr),"m"(channel),"m"(samples),"m"(tmp[0])
22375
8092494fc92c Add missing registers to asm code in mp3lib
reimar
parents: 18783
diff changeset
316 :"memory","%edi","%esi","%ebx","%ecx","%edx");
4147
nick
parents:
diff changeset
317 return retval;
nick
parents:
diff changeset
318 }