History

x86/audio_convert: fix clobbering of xmm registers

James Almer committed 11 years ago

Commit acdd6721 parent da767f01 file · +61 −61Browse files

Unified · Split

libswresample/x86/audio_convert.asm+61−61
@@ -202,8 +202,8 @@ cglobal %2_to_%1_%3, 3, 3, 6, dst, src, len · 201 unmodified lines
202202 %endif
203203 %endmacro
204204
205−%macro PACK_6CH 5-7
206−cglobal pack_6ch_%2_to_%1_%3, 2,8,7, dst, src, src1, src2, src3, src4, src5, len
205+%macro PACK_6CH 8
206+cglobal pack_6ch_%2_to_%1_%3, 2, 8, %6, dst, src, src1, src2, src3, src4, src5, len
207207 %if ARCH_X86_64
208208 mov lend, r2d
209209 %else
@@ -239,7 +239,7 @@ pack_6ch_%2_to_%1_u_int %+ SUFFIX: · 29 unmodified lines
239239 sub src3q, srcq
240240 sub src4q, srcq
241241 sub src5q, srcq
242− %7 x,x,x,x,m7,x
242+ %8 x,x,x,x,m7,x
243243 .loop:
244244 mov%3 m0, [srcq ]
245245 mov%3 m1, [srcq+src1q]
@@ -271,9 +271,9 @@ pack_6ch_%2_to_%1_u_int %+ SUFFIX: · 25 unmodified lines
271271 movlhps m1, m3
272272 movhlps m5, m3
273273
274− %6 m0,m6,x,x,m7,m3
275− %6 m4,m1,x,x,m7,m3
276− %6 m2,m5,x,x,m7,m3
274+ %7 m0,m6,x,x,m7,m3
275+ %7 m4,m1,x,x,m7,m3
276+ %7 m2,m5,x,x,m7,m3
277277
278278 mov %+ %3 %+ ps [dstq ], m0
279279 mov %+ %3 %+ ps [dstq+16], m6
@@ -305,8 +305,8 @@ pack_6ch_%2_to_%1_u_int %+ SUFFIX: · 25 unmodified lines
305305 %endif
306306 %endmacro
307307
308−%macro UNPACK_6CH 5-7
309−cglobal unpack_6ch_%2_to_%1_%3, 2, 8, 8, dst, src, dst1, dst2, dst3, dst4, dst5, len
308+%macro UNPACK_6CH 8
309+cglobal unpack_6ch_%2_to_%1_%3, 2, 8, %6, dst, src, dst1, dst2, dst3, dst4, dst5, len
310310 %if ARCH_X86_64
311311 mov lend, r2d
312312 %else
@@ -342,7 +342,7 @@ unpack_6ch_%2_to_%1_u_int %+ SUFFIX: · 29 unmodified lines
342342 sub dst3q, dstq
343343 sub dst4q, dstq
344344 sub dst5q, dstq
345− %7 x,x,x,x,m7,x
345+ %8 x,x,x,x,m7,x
346346 .loop:
347347 mov%3 m0, [srcq ]
348348 mov%3 m1, [srcq+16]
@@ -360,9 +360,9 @@ unpack_6ch_%2_to_%1_u_int %+ SUFFIX: · 11 unmodified lines
360360 SWAP 1, 4
361361 SWAP 2, 3
362362
363− %6 m0,m1,x,x,m7,m6
364− %6 m2,m3,x,x,m7,m6
365− %6 m4,m5,x,x,m7,m6
363+ %7 m0,m1,x,x,m7,m6
364+ %7 m2,m3,x,x,m7,m6
365+ %7 m4,m5,x,x,m7,m6
366366
367367 mov %+ %3 %+ ps [dstq ], m0
368368 mov %+ %3 %+ ps [dstq+dst1q], m1
@@ -380,8 +380,8 @@ unpack_6ch_%2_to_%1_u_int %+ SUFFIX: · 11 unmodified lines
380380
381381 %define PACK_8CH_GPRS (10 * ARCH_X86_64) + ((6 + HAVE_ALIGNED_STACK) * ARCH_X86_32)
382382
383−%macro PACK_8CH 5-7
384−cglobal pack_8ch_%2_to_%1_%3, 2,PACK_8CH_GPRS,10, ARCH_X86_32*48, dst, src, len, src1, src2, src3, src4, src5, src6, src7
383+%macro PACK_8CH 8
384+cglobal pack_8ch_%2_to_%1_%3, 2, PACK_8CH_GPRS, %6, ARCH_X86_32*48, dst, src, len, src1, src2, src3, src4, src5, src6, src7
385385 mov dstq, [dstq]
386386 %if ARCH_X86_32
387387 DEFINE_ARGS dst, src, src2, src3, src4, src5, src6
@@ -463,7 +463,7 @@ pack_8ch_%2_to_%1_u_int %+ SUFFIX: · 75 unmodified lines
463463 %endif
464464
465465 %if ARCH_X86_64
466− %7 x,x,x,x,m9,x
466+ %8 x,x,x,x,m9,x
467467 %elifidn %1, int32
468468 %define m9 [flt2p31]
469469 %else
@@ -489,10 +489,10 @@ pack_8ch_%2_to_%1_u_int %+ SUFFIX: · 19 unmodified lines
489489 %if ARCH_X86_64
490490 TRANSPOSE8x4D 0, 1, 2, 3, 4, 5, 6, 7, 8
491491
492− %6 m0,m1,x,x,m9,m8
493− %6 m2,m3,x,x,m9,m8
494− %6 m4,m5,x,x,m9,m8
495− %6 m6,m7,x,x,m9,m8
492+ %7 m0,m1,x,x,m9,m8
493+ %7 m2,m3,x,x,m9,m8
494+ %7 m4,m5,x,x,m9,m8
495+ %7 m6,m7,x,x,m9,m8
496496
497497 mov%3 [dstq], m0
498498 %else
@@ -500,12 +500,12 @@ pack_8ch_%2_to_%1_u_int %+ SUFFIX: · 1 unmodified line
500500
501501 TRANSPOSE8x4D 0, 1, 2, 3, 4, 5, 6, 7, [rsp], [rsp+16], 1
502502
503− %6 m0,m1,x,x,m9,m2
503+ %7 m0,m1,x,x,m9,m2
504504 mova m2, [rsp]
505505 mov%3 [dstq], m0
506− %6 m2,m3,x,x,m9,m0
507− %6 m4,m5,x,x,m9,m0
508− %6 m6,m7,x,x,m9,m0
506+ %7 m2,m3,x,x,m9,m0
507+ %7 m4,m5,x,x,m9,m0
508+ %7 m6,m7,x,x,m9,m0
509509
510510 %endif
511511
@@ -614,15 +614,15 @@ CONV int32, int16, a, 2, 1, INT16_TO_INT32_N, NOP_N · 102 unmodified lines
614614 CONV int16, int32, u, 1, 2, INT32_TO_INT16_N, NOP_N
615615 CONV int16, int32, a, 1, 2, INT32_TO_INT16_N, NOP_N
616616
617−PACK_6CH float, float, u, 2, 2, NOP_N, NOP_N
618−PACK_6CH float, float, a, 2, 2, NOP_N, NOP_N
617+PACK_6CH float, float, u, 2, 2, 0, NOP_N, NOP_N
618+PACK_6CH float, float, a, 2, 2, 0, NOP_N, NOP_N
619619
620620 INIT_XMM sse
621−PACK_6CH float, float, u, 2, 2, NOP_N, NOP_N
622−PACK_6CH float, float, a, 2, 2, NOP_N, NOP_N
621+PACK_6CH float, float, u, 2, 2, 7, NOP_N, NOP_N
622+PACK_6CH float, float, a, 2, 2, 7, NOP_N, NOP_N
623623
624−UNPACK_6CH float, float, u, 2, 2, NOP_N, NOP_N
625−UNPACK_6CH float, float, a, 2, 2, NOP_N, NOP_N
624+UNPACK_6CH float, float, u, 2, 2, 7, NOP_N, NOP_N
625+UNPACK_6CH float, float, a, 2, 2, 7, NOP_N, NOP_N
626626
627627 INIT_XMM sse2
628628 CONV int32, int16, u, 2, 1, INT16_TO_INT32_N, NOP_N
@@ -675,23 +675,23 @@ UNPACK_2CH float, int16, a, 2, 1, INT16_TO_FLOAT_N, INT16_TO_FLOAT_INIT · 46 unmodified lines
675675 UNPACK_2CH int16, float, u, 1, 2, FLOAT_TO_INT16_N, FLOAT_TO_INT16_INIT
676676 UNPACK_2CH int16, float, a, 1, 2, FLOAT_TO_INT16_N, FLOAT_TO_INT16_INIT
677677
678−PACK_6CH float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
679−PACK_6CH float, int32, a, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
680−PACK_6CH int32, float, u, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
681−PACK_6CH int32, float, a, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
678+PACK_6CH float, int32, u, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
679+PACK_6CH float, int32, a, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
680+PACK_6CH int32, float, u, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
681+PACK_6CH int32, float, a, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
682682
683−UNPACK_6CH float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
684−UNPACK_6CH float, int32, a, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
685−UNPACK_6CH int32, float, u, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
686−UNPACK_6CH int32, float, a, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
683+UNPACK_6CH float, int32, u, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
684+UNPACK_6CH float, int32, a, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
685+UNPACK_6CH int32, float, u, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
686+UNPACK_6CH int32, float, a, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
687687
688−PACK_8CH float, float, u, 2, 2, NOP_N, NOP_N
689−PACK_8CH float, float, a, 2, 2, NOP_N, NOP_N
688+PACK_8CH float, float, u, 2, 2, 9, NOP_N, NOP_N
689+PACK_8CH float, float, a, 2, 2, 9, NOP_N, NOP_N
690690
691−PACK_8CH float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
692−PACK_8CH float, int32, a, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
693−PACK_8CH int32, float, u, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
694−PACK_8CH int32, float, a, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
691+PACK_8CH float, int32, u, 2, 2, 10, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
692+PACK_8CH float, int32, a, 2, 2, 10, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
693+PACK_8CH int32, float, u, 2, 2, 10, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
694+PACK_8CH int32, float, a, 2, 2, 10, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
695695
696696 INIT_XMM ssse3
697697 UNPACK_2CH int16, int16, u, 1, 1, NOP_N, NOP_N
@@ -703,29 +703,29 @@ UNPACK_2CH float, int16, a, 2, 1, INT16_TO_FLOAT_N, INT16_TO_FLOAT_INIT · 5 unmodified lines
703703
704704 %if HAVE_AVX_EXTERNAL
705705 INIT_XMM avx
706−PACK_6CH float, float, u, 2, 2, NOP_N, NOP_N
707−PACK_6CH float, float, a, 2, 2, NOP_N, NOP_N
706+PACK_6CH float, float, u, 2, 2, 8, NOP_N, NOP_N
707+PACK_6CH float, float, a, 2, 2, 8, NOP_N, NOP_N
708708
709−UNPACK_6CH float, float, u, 2, 2, NOP_N, NOP_N
710−UNPACK_6CH float, float, a, 2, 2, NOP_N, NOP_N
709+UNPACK_6CH float, float, u, 2, 2, 8, NOP_N, NOP_N
710+UNPACK_6CH float, float, a, 2, 2, 8, NOP_N, NOP_N
711711
712−PACK_6CH float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
713−PACK_6CH float, int32, a, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
714−PACK_6CH int32, float, u, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
715−PACK_6CH int32, float, a, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
712+PACK_6CH float, int32, u, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
713+PACK_6CH float, int32, a, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
714+PACK_6CH int32, float, u, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
715+PACK_6CH int32, float, a, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
716716
717−UNPACK_6CH float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
718−UNPACK_6CH float, int32, a, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
719−UNPACK_6CH int32, float, u, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
720−UNPACK_6CH int32, float, a, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
717+UNPACK_6CH float, int32, u, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
718+UNPACK_6CH float, int32, a, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
719+UNPACK_6CH int32, float, u, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
720+UNPACK_6CH int32, float, a, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
721721
722−PACK_8CH float, float, u, 2, 2, NOP_N, NOP_N
723−PACK_8CH float, float, a, 2, 2, NOP_N, NOP_N
722+PACK_8CH float, float, u, 2, 2, 9, NOP_N, NOP_N
723+PACK_8CH float, float, a, 2, 2, 9, NOP_N, NOP_N
724724
725−PACK_8CH float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
726−PACK_8CH float, int32, a, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
727−PACK_8CH int32, float, u, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
728−PACK_8CH int32, float, a, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
725+PACK_8CH float, int32, u, 2, 2, 10, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
726+PACK_8CH float, int32, a, 2, 2, 10, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
727+PACK_8CH int32, float, u, 2, 2, 10, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
728+PACK_8CH int32, float, a, 2, 2, 10, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
729729
730730 INIT_YMM avx
731731 CONV float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t