Lines 54-59
Link Here
|
54 |
void make_decode_tables_MMX(long scaleval) |
54 |
void make_decode_tables_MMX(long scaleval) |
55 |
{ |
55 |
{ |
56 |
long intwinbase_step; |
56 |
long intwinbase_step; |
|
|
57 |
long *mp3lib_decwins_0=&mp3lib_decwins[0]; |
58 |
real *mp3lib_decwin_0=&mp3lib_decwin[0]; |
57 |
intwinbase_step=2; |
59 |
intwinbase_step=2; |
58 |
scaleval =- scaleval; |
60 |
scaleval =- scaleval; |
59 |
__asm __volatile( |
61 |
__asm __volatile( |
Lines 65-71
Link Here
|
65 |
"cmpl $528,%%ecx\n\t" |
67 |
"cmpl $528,%%ecx\n\t" |
66 |
"jnc .L02\n\t" |
68 |
"jnc .L02\n\t" |
67 |
"movswl (%%edi),%%eax\n\t" |
69 |
"movswl (%%edi),%%eax\n\t" |
|
|
70 |
#ifndef __PIC__ |
68 |
"cmpl %0+444,%%edi\n\t" |
71 |
"cmpl %0+444,%%edi\n\t" |
|
|
72 |
#else |
73 |
"movl %0,%%edx\n\t" // Using edx here is ok; it's overwritten in L02 anyway. |
74 |
"addl $444,%%edx\n\t" |
75 |
"cmpl %%edx,%%edi\n\t" |
76 |
#endif |
69 |
"jc .L01\n\t" |
77 |
"jc .L01\n\t" |
70 |
"addl $60000,%%eax\n\t" |
78 |
"addl $60000,%%eax\n\t" |
71 |
".L01:\n\t" |
79 |
".L01:\n\t" |
Lines 74-81
Link Here
|
74 |
"fdivs "MANGLE(intwindiv)"\n\t" |
82 |
"fdivs "MANGLE(intwindiv)"\n\t" |
75 |
"popl %%eax\n\t" |
83 |
"popl %%eax\n\t" |
76 |
"fimull %2\n\t" |
84 |
"fimull %2\n\t" |
|
|
85 |
#ifndef __PIC__ |
77 |
"fsts %1(,%%ecx,4)\n\t" |
86 |
"fsts %1(,%%ecx,4)\n\t" |
78 |
"fstps %1+64(,%%ecx,4)\n\t" |
87 |
"fstps %1+64(,%%ecx,4)\n\t" |
|
|
88 |
#else |
89 |
"movl %1,%%edx\n\t" // Using edx here is ok; it's overwritten in L02 anyway. |
90 |
"fsts (%%edx,%%ecx,4)\n\t" |
91 |
"addl $64,%%edx\n\t" |
92 |
"fstps (%%edx,%%ecx,4)\n\t" |
93 |
#endif |
79 |
".L02:\n\t" |
94 |
".L02:\n\t" |
80 |
"leal -1(%%esi),%%edx\n\t" |
95 |
"leal -1(%%esi),%%edx\n\t" |
81 |
"and %%ebx,%%edx\n\t" |
96 |
"and %%ebx,%%edx\n\t" |
Lines 96-102
Link Here
|
96 |
"negl %3\n\t" |
111 |
"negl %3\n\t" |
97 |
"jmp .L00\n\t" |
112 |
"jmp .L00\n\t" |
98 |
".L04:\n\t" |
113 |
".L04:\n\t" |
|
|
114 |
#ifndef __PIC__ |
99 |
::"g"(intwinbase_MMX),"m"(mp3lib_decwin[0]),"m"(scaleval),"m"(intwinbase_step) |
115 |
::"g"(intwinbase_MMX),"m"(mp3lib_decwin[0]),"m"(scaleval),"m"(intwinbase_step) |
|
|
116 |
#else |
117 |
::"g"(intwinbase_MMX),"m"(mp3lib_decwin_0),"m"(scaleval),"m"(intwinbase_step) |
118 |
#endif |
100 |
:"memory","%ebx","%esi","%edi"); |
119 |
:"memory","%ebx","%esi","%edi"); |
101 |
intwinbase_step=2; |
120 |
intwinbase_step=2; |
102 |
__asm __volatile( |
121 |
__asm __volatile( |
Lines 106-115
Link Here
|
106 |
"cmpl $528,%%ecx\n\t" |
125 |
"cmpl $528,%%ecx\n\t" |
107 |
"jnc .L11\n\t" |
126 |
"jnc .L11\n\t" |
108 |
"movswl (%%edi),%%eax\n\t" |
127 |
"movswl (%%edi),%%eax\n\t" |
|
|
128 |
#ifndef __PIC__ |
109 |
"cmpl %0+444,%%edi\n\t" |
129 |
"cmpl %0+444,%%edi\n\t" |
|
|
130 |
#else |
131 |
"pushl %%edx\n\t" // Need to save edx here - it's already in use. Pop after L06. |
132 |
"movl %0,%%edx\n\t" |
133 |
"addl $444,%%edx\n\t" |
134 |
"cmpl %%edx,%%edi\n\t" |
135 |
#endif |
110 |
"jc .L06\n\t" |
136 |
"jc .L06\n\t" |
111 |
"addl $60000,%%eax\n\t" |
137 |
"addl $60000,%%eax\n\t" |
112 |
".L06:\n\t" |
138 |
".L06:\n\t" |
|
|
139 |
#ifdef __PIC__ |
140 |
"popl %%edx\n\t" |
141 |
#endif |
113 |
"cltd\n\t" |
142 |
"cltd\n\t" |
114 |
"imull %2\n\t" |
143 |
"imull %2\n\t" |
115 |
"shrdl $17,%%edx,%%eax\n\t" |
144 |
"shrdl $17,%%edx,%%eax\n\t" |
Lines 126-140
Link Here
|
126 |
"cmpl $512,%%ecx\n\t" |
155 |
"cmpl $512,%%ecx\n\t" |
127 |
"jnc .L09\n\t" |
156 |
"jnc .L09\n\t" |
128 |
"subl %%ecx,%%edx\n\t" |
157 |
"subl %%ecx,%%edx\n\t" |
|
|
158 |
#ifndef __PIC__ |
129 |
"movw %%ax,%1(,%%edx,2)\n\t" |
159 |
"movw %%ax,%1(,%%edx,2)\n\t" |
130 |
"movw %%ax,%1-32(,%%edx,2)\n\t" |
160 |
"movw %%ax,%1-32(,%%edx,2)\n\t" |
|
|
161 |
#else |
162 |
"pushl %%ebx\n\t" // Save ebx here |
163 |
"movl %1,%%ebx\n\t" |
164 |
"movw %%ax,(%%ebx,%%edx,2)\n\t" |
165 |
"addl $-32,%%ebx\n\t" |
166 |
"movw %%ax,(%%ebx,%%edx,2)\n\t" |
167 |
#endif |
131 |
".L09:\n\t" |
168 |
".L09:\n\t" |
132 |
"testl $1,%%ecx\n\t" |
169 |
"testl $1,%%ecx\n\t" |
133 |
"jnz .L10\n\t" |
170 |
"jnz .L10\n\t" |
134 |
"negl %%eax\n\t" |
171 |
"negl %%eax\n\t" |
135 |
".L10:\n\t" |
172 |
".L10:\n\t" |
|
|
173 |
#ifndef __PIC__ |
136 |
"movw %%ax,%1(,%%ecx,2)\n\t" |
174 |
"movw %%ax,%1(,%%ecx,2)\n\t" |
137 |
"movw %%ax,%1+32(,%%ecx,2)\n\t" |
175 |
"movw %%ax,%1+32(,%%ecx,2)\n\t" |
|
|
176 |
#else |
177 |
"movl %1,%%ebx\n\t" |
178 |
"movw %%ax,(%%ebx,%%ecx,2)\n\t" |
179 |
"addl $32,%%ebx\n\t" |
180 |
"movw %%ax,(%%ebx,%%ecx,2)\n\t" |
181 |
"popl %%ebx\n\t" // Restore |
182 |
#endif |
138 |
".L11:\n\t" |
183 |
".L11:\n\t" |
139 |
"leal -1(%%esi),%%edx\n\t" |
184 |
"leal -1(%%esi),%%edx\n\t" |
140 |
"and %%ebx,%%edx\n\t" |
185 |
"and %%ebx,%%edx\n\t" |
Lines 155-160
Link Here
|
155 |
"negl %3\n\t" |
200 |
"negl %3\n\t" |
156 |
"jmp .L05\n\t" |
201 |
"jmp .L05\n\t" |
157 |
".L13:\n\t" |
202 |
".L13:\n\t" |
|
|
203 |
#ifndef __PIC__ |
158 |
::"g"(intwinbase_MMX),"m"(mp3lib_decwins[0]),"m"(scaleval),"m"(intwinbase_step) |
204 |
::"g"(intwinbase_MMX),"m"(mp3lib_decwins[0]),"m"(scaleval),"m"(intwinbase_step) |
|
|
205 |
#else |
206 |
::"g"(intwinbase_MMX),"m"(mp3lib_decwins_0),"m"(scaleval),"m"(intwinbase_step) |
207 |
#endif |
159 |
:"memory","%ebx","%esi","%edi"); |
208 |
:"memory","%ebx","%esi","%edi"); |
160 |
} |
209 |
} |