Debian Codegraph @

cvd_src/i686/yuv411_to_stuff_MMX.C

raw
1 /*
2 This file is part of the CVD Library.
3
4 Copyright (C) 2005 The Authors
5
6 This library is free software, see LICENSE file for details
7 */
8 #include <cvd/colourspace.h>
9 #include <cvd/config.h>
10
11 namespace CVD
12 {
13 namespace ColourSpace
14 {
15
16
17 void yuv411_to_rgb_y(const unsigned char* in, int size, unsigned char* out, unsigned char *lum_out)
18 {
19 //Time: 5.0ms memcpy on number of luma pixels only takes 1.5 ms
20
21 const unsigned char* in_end = in + size * 6 / 4;
22
23 size /=8;
24
25 __asm__ __volatile__(
26 //Put some zeros in mm7
27 "mov $0, %%eax \n\t"
28 "movd %%eax, %%mm7 \n\t"
29
30 //Load out and in
31 "mov %0, %%edi \n\t"
32 "mov %1, %%esi \n\t"
33 "push %%ebx \n\t" //save ebx. For some reason, the compiler won't do this
34 "push %%ebp \n\t" //save the stack base
35 "push %[end] \n\t"
36 "mov %[luma], %%ebp \n\t"
37
38 ".Lfoo: \n\t"
39
40 "prefetchnta 128(%%esi) \n\t"
41
42 /*Convert yuv411 to rgb8
43 format is u1 y1 y2 v1 y3 y4
44 u, v are int8 - 128
45 y are uint8
46
47 For YUV in general:
48 r = y + 1.140 * v = y + rv
49 g = y - 0.394*u - 0.581*v = y + guv
50 b = y + 2.028 * u = y + bu
51
52 Arithmetic is performed using fixed point with a left shift of 7 (ie *128)
53 u1, v1 are not interpolated between y pixels, ie u1,v1 are used for y1,y2,y3,y4
54 b is truncated slightly, ie b= y + 2.0 * u
55
56 The resultant 8 bit r,g,b values need to be saturated, since overflow occurs
57 and this leads to very ugly results.
58 */
59
60 ////////////////////////////////////////////////////////////
61 //
62 // Load and convert the chrominance values to mmxable things
63 //
64
65 //Create the register mm0 = * bu guv rv
66 //Let ecx, edx contain (u-128), (v-128)
67
68 //Note the following 4 instructions are in a different order in the second
69 //block, since it's faster to have them different (!)
70
71 "movzbl 3(%%esi), %%edx \n\t" //dx = v move-(with-zero-extend)-byte-(in to)-long
72 "sub $128, %%edx \n\t"
73 "movzbl (%%esi), %%ecx \n\t" //cx = u
74 "sub $128, %%ecx \n\t"
75
76 "mov %%edx, %%eax \n\t" //Calculate and insert rv = v * 147
77 "imul $147, %%eax \n\t"
78 "pinsrw $0, %%eax, %%mm0 \n\t"
79
80 "mov %%ecx, %%ebx \n\t" //Calculate and insert bu = v * 256
81 "imul $256, %%ebx \n\t"
82 "pinsrw $2, %%ebx, %%mm0 \n\t"
83
84 "imul $-38, %%ecx \n\t" //Calculate and insert guv = -38u + -74v GKMOD
85 "imul $-74, %%edx \n\t"
86
87 //There's a gap here while we wait for the imuls to finish. Maybe?
88
89
90
91 "add %%ecx, %%edx \n\t"
92 "pinsrw $1, %%edx, %%mm0 \n\t" //now, mm0 = 0 bu guv rv
93
94 ////////////////////////////////////////////////////////////
95 //
96 // Load and convert luminance
97 //
98
99 //Put y4y3y2y1 in to eax
100 "mov 2(%%esi), %%eax \n\t" //Load y4y3?? in to eax
101 "movw 1(%%esi), %%ax \n\t" //load y2y1 in to ax
102
103 //Unpack and shift left by 7, so that mm3 contains the fixed point version of y4--y1
104 "movd %%eax, %%mm3 \n\t"
105 "punpcklbw %%mm7, %%mm3 \n\t"
106 "psllw $7, %%mm3 \n\t"
107
108 "pshufw $0x40, %%mm3, %%mm1 \n\t" //Create y2 y1 y1 y1 register mm1: 0x40 = 01 00 00 00
109 "pshufw $0xa5, %%mm3, %%mm2 \n\t" //Create y3 y3 y2 y2 register mm2: 0xa5 = 10 10 01 01
110 "pshufw $0xfe, %%mm3, %%mm3 \n\t" //Create y4 y4 y4 y3 register mm3: 0xfe = 11 11 11 10
111
112
113 #ifdef CVD_HAVE_SSE2
114 "movnti %%eax, (%%ebp) \n\t"
115 #else
116 "mov %%eax, (%%ebp) \n\t"
117 #endif
118
119 /////////////////////////////////////////////////////////////
120 //
121 // Perform fixed point conversion to RGB
122 //
123
124 //Perform mm1 += mm0, mm2 += mm0, etc
125 //permute mm0 each time in to the right shape
126 "pshufw $0x24, %%mm0, %%mm0 \n\t" //mm0 = r b g r 0x24 = 00 10 01 00
127 "paddw %%mm0, %%mm1 \n\t"
128
129 "pshufw $0x49, %%mm0, %%mm0 \n\t" //mm0 = g r b g 0x49 = 01 00 10 01
130 "paddw %%mm0, %%mm2 \n\t"
131
132 "pshufw $0x49, %%mm0, %%mm0 \n\t" //mm0 = b g r b 0x49 = 01 00 10 01
133 "paddw %%mm0, %%mm3 \n\t"
134
135 //Perform right shift of 7 (mm5) on mm1, 2, 3, 4
136 //!!!!! Apparently, there is only one shifter. Might be good to reorganise a bit
137 "psrlw $7, %%mm1 \n\t"
138 "psrlw $7, %%mm2 \n\t"
139 "psrlw $7, %%mm3 \n\t"
140
141 //Pack mm1,2 in to mm1 with unsigned saturation
142 "packuswb %%mm2, %%mm1 \n\t"
143
144 //At this point we only have 3 pixels, which won't leave the writing
145 //position in a 64 bit aligned state, so do another 3.
146
147 ////////////////////////////////////////////////////////////////////////////////
148 ////////////////////////////////////////////////////////////////////////////////
149 ////////////////////////////////////////////////////////////////////////////////
150 ////////////////////////////////////////////////////////////////////////////////
151 //Perform the conversion on the second set of 3 pixels.
152
153
154 ////////////////////////////////////////////////////////////
155 //
156 // Load and convert the chrominance values to mmxable things
157 //
158
159 //Create the register mm0 = * bu guv rv
160 //Let ecx, edx contain (u-128), (v-128)
161
162 "movzbl 9(%%esi), %%edx \n\t" //dx = v
163 "movzbl 6(%%esi), %%ecx \n\t" //cx = u move-(with-zero-extend)-byte-(in to)-long
164 "sub $128, %%edx \n\t"
165 "sub $128, %%ecx \n\t"
166
167 "mov %%edx, %%eax \n\t" //Calculate and insert rv = v * 147
168 "imul $147, %%eax \n\t"
169 "pinsrw $0, %%eax, %%mm0 \n\t"
170
171 "mov %%ecx, %%ebx \n\t" //Calculate and insert bu = v * 256
172 "imul $256, %%ebx \n\t"
173 "pinsrw $2, %%ebx, %%mm0 \n\t"
174
175 "imul $-38, %%ecx \n\t" //Calculate and insert guv = -38u + -74v
176 "imul $-74, %%edx \n\t"
177 "add %%ecx, %%edx \n\t"
178 "pinsrw $1, %%edx, %%mm0 \n\t" //now, mm0 = 0 bu guv rv
179
180
181 ////////////////////////////////////////////////////////////
182 //
183 // Load and convert luminance
184 //
185
186 //Put y4y3y2y1 in to eax
187 "mov 8(%%esi), %%eax \n\t" //Load y4y3?? in to eax
188 "movw 7(%%esi), %%ax \n\t" //load y2y1 in to ax
189
190 //Unpack and shift left by 7, so that mm5 contains the fixed point version of y4--y1
191 "movd %%eax, %%mm6 \n\t"
192 "punpcklbw %%mm7, %%mm6 \n\t"
193 "psllw $7, %%mm6 \n\t"
194
195
196 #ifdef CVD_HAVE_SSE2
197 "movnti %%eax, 4(%%ebp) \n\t"
198 #else
199 "mov %%eax, 4(%%ebp) \n\t"
200 #endif
201 // "pushl %%eax \n\t"
202 // "movq -8(%%esp), %%mm2 \n\t"
203 // "movntq %%mm2, (%%ebp) \n\t"
204 // "popl %%eax \n\t"
205 // "popl %%ebx \n\t"
206
207
208 "pshufw $0x40, %%mm6, %%mm4 \n\t" //Create y2 y1 y1 y1 register mm1: 0x40 = 01 00 00 00
209 "pshufw $0xa5, %%mm6, %%mm5 \n\t" //Create y3 y3 y2 y2 register mm2: 0xa5 = 10 10 01 01
210 "pshufw $0xfe, %%mm6, %%mm6 \n\t" //Create y4 y4 y4 y3 register mm3: 0xfe = 11 11 11 10
211
212
213 /////////////////////////////////////////////////////////////
214 //
215 // Perform fixed point conversion to RGB
216 //
217
218 //Perform mm1 += mm0, mm2 += mm0, etc
219 //permute mm0 each time in to the right shape
220 "pshufw $0x24, %%mm0, %%mm0 \n\t" //mm0 = r b g r 0x24 = 00 10 01 00
221 "paddw %%mm0, %%mm4 \n\t"
222
223 "pshufw $0x49, %%mm0, %%mm0 \n\t" //mm0 = g r b g 0x49 = 01 00 10 01
224 "paddw %%mm0, %%mm5 \n\t"
225
226 "pshufw $0x49, %%mm0, %%mm0 \n\t" //mm0 = b g r b 0x49 = 01 00 10 01
227 "paddw %%mm0, %%mm6 \n\t"
228
229 //Perform right shift of 7 (mm5) on mm1, 2, 3, 4
230 "psrlw $7, %%mm4 \n\t"
231 "psrlw $7, %%mm5 \n\t"
232 "psrlw $7, %%mm6 \n\t"
233
234 //Pack mm1,2 in to mm1 and mm3,4 in to mm3 with unsigned saturation
235 "packuswb %%mm4, %%mm3 \n\t"
236 "packuswb %%mm6, %%mm5 \n\t"
237
238 //movntq uses write-combining. Fast.
239 "movntq %%mm1, (%%edi) \n\t"
240 "movntq %%mm3, 8(%%edi) \n\t"
241 "movntq %%mm5, 16(%%edi)\n\t"
242
243
244 ////////////////////////////////////////////////////////////////////////////////
245 ////////////////////////////////////////////////////////////////////////////////
246 ////////////////////////////////////////////////////////////////////////////////
247
248 //Increment counters
249 "add $12, %%esi \n\t"
250 "add $24, %%edi \n\t"
251 "add $8, %%ebp \n\t"
252 "cmp %%esi, (%%esp) \n\t" //in_end is on the top of the stack
253 "jne .Lfoo \n\t"
254
255 "popl %%eax \n\t" //discard the top
256 "popl %%ebp \n\t" //restore ebp
257 "popl %%ebx \n\t" //restore ebx
258 "emms \n\t" //End mmx
259 // 0 1 2
260 :
261 : "m" (out), "m" (in), "g" (size), [luma] "m" (lum_out), [end] "m" (in_end)
262 : "eax", "ecx", "edx", "edi", "esi", "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7"
263 );
264 }
265 void yuv411_to_rgb(const unsigned char* in, int size, unsigned char* out)
266 {
267 //Time: 5.0ms memcpy on number of luma pixels only takes 1.5 ms
268 size /=8;
269 __asm__ __volatile__(
270 //Put some zeros in mm7
271 "mov $0, %%eax \n\t"
272 "movd %%eax, %%mm7 \n\t"
273
274 //Load out and in
275 "mov %0, %%edi \n\t"
276 "mov %1, %%esi \n\t"
277 "push %%ebx \n\t" //save ebx. For some reason, the compiler won't do this
278 "push %%ebp \n\t" //save the stack base
279 "mov %2, %%ebp \n\t"
280
281 ".Lyuv411dec: \n\t"
282
283 "prefetchnta 64(%%esi) \n\t"
284 /*Convert yuv411 to rgb8
285 format is u1 y1 y2 v1 y3 y4
286 u, v are int8 - 128
287 y are uint8
288
289 For YUV in general:
290 r = y + 1.140 * v = y + rv
291 g = y - 0.394*u - 0.581*v = y + guv
292 b = y + 2.028 * u = y + bu
293
294 Arithmetic is performed using fixed point with a left shift of 7 (ie *128)
295 u1, v1 are not interpolated between y pixels, ie u1,v1 are used for y1,y2,y3,y4
296 b is truncated slightly, ie b= y + 2.0 * u
297
298 The resultant 8 bit r,g,b values need to be saturated, since overflow occurs
299 and this leads to very ugly results.
300 */
301
302 ////////////////////////////////////////////////////////////
303 //
304 // Load and convert the chrominance values to mmxable things
305 //
306
307 //Create the register mm0 = * bu guv rv
308 //Let ecx, edx contain (u-128), (v-128)
309
310 //Note the following 4 instructions are in a different order in the second
311 //block, since it's faster to have them different (!)
312
313 "movzbl 3(%%esi), %%edx \n\t" //dx = v move-(with-zero-extend)-byte-(in to)-long
314 "sub $128, %%edx \n\t"
315 "movzbl (%%esi), %%ecx \n\t" //cx = u
316 "sub $128, %%ecx \n\t"
317
318 "mov %%edx, %%eax \n\t" //Calculate and insert rv = v * 147
319 "imul $147, %%eax \n\t"
320 "pinsrw $0, %%eax, %%mm0 \n\t"
321
322 "mov %%ecx, %%ebx \n\t" //Calculate and insert bu = v * 256
323 "imul $256, %%ebx \n\t"
324 "pinsrw $2, %%ebx, %%mm0 \n\t"
325
326 "imul $-38, %%ecx \n\t" //Calculate and insert guv = -38u + -74v
327 "imul $-74, %%edx \n\t"
328
329 //There's a gap here while we wait for the imuls to finish. Maybe?
330
331
332
333 "add %%ecx, %%edx \n\t"
334 "pinsrw $1, %%edx, %%mm0 \n\t" //now, mm0 = 0 bu guv rv
335
336 ////////////////////////////////////////////////////////////
337 //
338 // Load and convert luminance
339 //
340
341 //Put y4y3y2y1 in to eax
342 "mov 2(%%esi), %%eax \n\t" //Load y4y3?? in to eax
343 "movw 1(%%esi), %%ax \n\t" //load y2y1 in to ax
344
345 //Unpack and shift left by 7, so that mm3 contains the fixed point version of y4--y1
346 "movd %%eax, %%mm3 \n\t"
347 "punpcklbw %%mm7, %%mm3 \n\t"
348 "psllw $7, %%mm3 \n\t"
349
350 "pshufw $0x40, %%mm3, %%mm1 \n\t" //Create y2 y1 y1 y1 register mm1: 0x40 = 01 00 00 00
351 "pshufw $0xa5, %%mm3, %%mm2 \n\t" //Create y3 y3 y2 y2 register mm2: 0xa5 = 10 10 01 01
352 "pshufw $0xfe, %%mm3, %%mm3 \n\t" //Create y4 y4 y4 y3 register mm3: 0xfe = 11 11 11 10
353
354
355 /////////////////////////////////////////////////////////////
356 //
357 // Perform fixed point conversion to RGB
358 //
359
360 //Perform mm1 += mm0, mm2 += mm0, etc
361 //permute mm0 each time in to the right shape
362 "pshufw $0x24, %%mm0, %%mm0 \n\t" //mm0 = r b g r 0x24 = 00 10 01 00
363 "paddw %%mm0, %%mm1 \n\t"
364
365 "pshufw $0x49, %%mm0, %%mm0 \n\t" //mm0 = g r b g 0x49 = 01 00 10 01
366 "paddw %%mm0, %%mm2 \n\t"
367
368 "pshufw $0x49, %%mm0, %%mm0 \n\t" //mm0 = b g r b 0x49 = 01 00 10 01
369 "paddw %%mm0, %%mm3 \n\t"
370
371 //Perform right shift of 7 (mm5) on mm1, 2, 3, 4
372 //!!!!! Apparently, there is only one shifter. Might be good to reorganise a bit
373 "psrlw $7, %%mm1 \n\t"
374 "psrlw $7, %%mm2 \n\t"
375 "psrlw $7, %%mm3 \n\t"
376
377 //Pack mm1,2 in to mm1 with unsigned saturation
378 "packuswb %%mm2, %%mm1 \n\t"
379
380 //At this point we only have 3 pixels, which won't leave the writing
381 //position in a 64 bit aligned state, so do another 3.
382
383 ////////////////////////////////////////////////////////////////////////////////
384 ////////////////////////////////////////////////////////////////////////////////
385 ////////////////////////////////////////////////////////////////////////////////
386 ////////////////////////////////////////////////////////////////////////////////
387 //Perform the conversion on the second set of 3 pixels.
388
389
390 ////////////////////////////////////////////////////////////
391 //
392 // Load and convert the chrominance values to mmxable things
393 //
394
395 //Create the register mm0 = * bu guv rv
396 //Let ecx, edx contain (u-128), (v-128)
397
398 "movzbl 9(%%esi), %%edx \n\t" //dx = v
399 "movzbl 6(%%esi), %%ecx \n\t" //cx = u move-(with-zero-extend)-byte-(in to)-long
400 "sub $128, %%edx \n\t"
401 "sub $128, %%ecx \n\t"
402
403 "mov %%edx, %%eax \n\t" //Calculate and insert rv = v * 147
404 "imul $147, %%eax \n\t"
405 "pinsrw $0, %%eax, %%mm0 \n\t"
406
407 "mov %%ecx, %%ebx \n\t" //Calculate and insert bu = v * 256
408 "imul $256, %%ebx \n\t"
409 "pinsrw $2, %%ebx, %%mm0 \n\t"
410
411 "imul $-38, %%ecx \n\t" //Calculate and insert guv = -38u + -74v
412 "imul $-74, %%edx \n\t"
413 "add %%ecx, %%edx \n\t"
414 "pinsrw $1, %%edx, %%mm0 \n\t" //now, mm0 = 0 bu guv rv
415
416
417 ////////////////////////////////////////////////////////////
418 //
419 // Load and convert luminance
420 //
421
422 //Put y4y3y2y1 in to eax
423 "mov 8(%%esi), %%eax \n\t" //Load y4y3?? in to eax
424 "movw 7(%%esi), %%ax \n\t" //load y2y1 in to ax
425
426 //Unpack and shift left by 7, so that mm5 contains the fixed point version of y4--y1
427 "movd %%eax, %%mm6 \n\t"
428 "punpcklbw %%mm7, %%mm6 \n\t"
429 "psllw $7, %%mm6 \n\t"
430
431 "pshufw $0x40, %%mm6, %%mm4 \n\t" //Create y2 y1 y1 y1 register mm1: 0x40 = 01 00 00 00
432 "pshufw $0xa5, %%mm6, %%mm5 \n\t" //Create y3 y3 y2 y2 register mm2: 0xa5 = 10 10 01 01
433 "pshufw $0xfe, %%mm6, %%mm6 \n\t" //Create y4 y4 y4 y3 register mm3: 0xfe = 11 11 11 10
434
435
436 /////////////////////////////////////////////////////////////
437 //
438 // Perform fixed point conversion to RGB
439 //
440
441 //Perform mm1 += mm0, mm2 += mm0, etc
442 //permute mm0 each time in to the right shape
443 "pshufw $0x24, %%mm0, %%mm0 \n\t" //mm0 = r b g r 0x24 = 00 10 01 00
444 "paddw %%mm0, %%mm4 \n\t"
445
446 "pshufw $0x49, %%mm0, %%mm0 \n\t" //mm0 = g r b g 0x49 = 01 00 10 01
447 "paddw %%mm0, %%mm5 \n\t"
448
449 "pshufw $0x49, %%mm0, %%mm0 \n\t" //mm0 = b g r b 0x49 = 01 00 10 01
450 "paddw %%mm0, %%mm6 \n\t"
451
452 //Perform right shift of 7 (mm5) on mm1, 2, 3, 4
453 "psrlw $7, %%mm4 \n\t"
454 "psrlw $7, %%mm5 \n\t"
455 "psrlw $7, %%mm6 \n\t"
456
457 //Pack mm1,2 in to mm1 and mm3,4 in to mm3 with unsigned saturation
458 "packuswb %%mm4, %%mm3 \n\t"
459 "packuswb %%mm6, %%mm5 \n\t"
460
461 //movntq uses write-combining. Fast.
462 "movntq %%mm1, (%%edi) \n\t"
463 "movntq %%mm3, 8(%%edi) \n\t"
464 "movntq %%mm5, 16(%%edi)\n\t"
465
466
467 ////////////////////////////////////////////////////////////////////////////////
468 ////////////////////////////////////////////////////////////////////////////////
469 ////////////////////////////////////////////////////////////////////////////////
470
471 //Increment counters
472 "add $24, %%edi \n\t"
473 "add $12, %%esi \n\t"
474 "dec %%ebp \n\t"
475 "jnz .Lyuv411dec \n\t"
476
477 "popl %%ebp \n\t" //restore ebp
478 "popl %%ebx \n\t" //restore ebx
479 "emms \n\t" //End mmx
480 // 0 1 2
481 :
482 : "m" (out), "m" (in), "g" (size)
483 : "eax", "ecx", "edx", "edi", "esi", "mm0", "mm1", "mm2", "mm3", "mm4", "mm5"
484 );
485 }
486
487 void yuv411_to_y(const unsigned char* in, int size, unsigned char* out)
488 {
489 //Time, 2.5ms. Comparison, memcpy on the same number of output bytes=1.5ms
490
491 size /=16;
492 __asm__ __volatile__(
493 "push %%ebx \n\t"
494 "push %%ebp \n\t"
495 "mov %0, %%edi \n\t"
496 "mov %1, %%esi \n\t"
497 "mov %2, %%ebp \n\t"
498 ".Lyuvtolum: \n\t"
499 "prefetchnta 64(%%esi) \n\t"
500 "mov 2(%%esi), %%eax \n\t"
501 "movw 1(%%esi), %%ax \n\t"
502 "mov 8(%%esi), %%ebx \n\t"
503 "movw 7(%%esi), %%bx \n\t"
504 "mov 14(%%esi), %%ecx \n\t"
505 "movw 13(%%esi), %%cx \n\t"
506 "mov 20(%%esi), %%edx \n\t"
507 "movw 19(%%esi), %%dx \n\t"
508
509 //Write combining stuff, movnt seems only to work (SIGILL)
510 //on the P3 from MMX registers, so pack the data in to MMX
511 //registers before moving it.
512
513 "movd %%eax, %%mm0 \n\t"
514 "movd %%ebx, %%mm1 \n\t"
515 "psllq $32, %%mm1 \n\t"
516 "por %%mm1, %%mm0 \n\t" //mm0 = ebx,eax
517
518 "movd %%ecx, %%mm1 \n\t"
519 "movd %%edx, %%mm2 \n\t"
520 "psllq $32, %%mm2 \n\t"
521 "por %%mm2, %%mm1 \n\t" //mm1 = ebx,eax
522
523 "movntq %%mm0, (%%edi) \n\t"
524 "movntq %%mm1, 8(%%edi) \n\t"
525
526
527 /* this doens't help
528 "mov 26(%%esi), %%eax \n\t"
529 "movw 25(%%esi), %%ax \n\t"
530 "mov 32(%%esi), %%ebx \n\t"
531 "movw 31(%%esi), %%bx \n\t"
532 "mov 38(%%esi), %%ecx \n\t"
533 "movw 37(%%esi), %%cx \n\t"
534 "mov 44(%%esi), %%edx \n\t"
535 "movw 43(%%esi), %%dx \n\t"
536
537 "movd %%eax, %%mm2 \n\t"
538 "movd %%ebx, %%mm3 \n\t"
539 "psllq $32, %%mm3 \n\t"
540 "por %%mm3, %%mm2 \n\t" //mm2 = ebx,eax
541
542 "movd %%ecx, %%mm3 \n\t"
543 "movd %%edx, %%mm4 \n\t"
544 "psllq $32, %%mm4 \n\t"
545 "por %%mm4, %%mm3 \n\t" //mm1 = ebx,eax
546
547 "movntq %%mm0, (%%edi) \n\t"
548 "movntq %%mm1, 8(%%edi) \n\t"
549 */
550
551 "add $24, %%esi \n\t"
552 "add $16, %%edi \n\t"
553 "dec %%ebp \n\t"
554 "jnz .Lyuvtolum \n\t"
555 "popl %%ebp \n\t"
556 "popl %%ebx \n\t"
557 "emms \n\t"
558 :
559 : "m" (out), "m" (in), "g" (size)
560 : "eax", "ecx", "edi", "esi"
561 );
562 }
563
564 }
565 }