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
202%endif202%endif
203%endmacro203%endmacro
204 204
205%macro PACK_6CH 5-7205%macro PACK_6CH 8
206cglobal pack_6ch_%2_to_%1_%3, 2,8,7, dst, src, src1, src2, src3, src4, src5, len206cglobal pack_6ch_%2_to_%1_%3, 2, 8, %6, dst, src, src1, src2, src3, src4, src5, len
207%if ARCH_X86_64207%if ARCH_X86_64
208 mov lend, r2d208 mov lend, r2d
209%else209%else
@@ -239,7 +239,7 @@ pack_6ch_%2_to_%1_u_int %+ SUFFIX: · 29 unmodified lines
239 sub src3q, srcq239 sub src3q, srcq
240 sub src4q, srcq240 sub src4q, srcq
241 sub src5q, srcq241 sub src5q, srcq
242 %7 x,x,x,x,m7,x242 %8 x,x,x,x,m7,x
243.loop:243.loop:
244 mov%3 m0, [srcq ]244 mov%3 m0, [srcq ]
245 mov%3 m1, [srcq+src1q]245 mov%3 m1, [srcq+src1q]
@@ -271,9 +271,9 @@ pack_6ch_%2_to_%1_u_int %+ SUFFIX: · 25 unmodified lines
271 movlhps m1, m3271 movlhps m1, m3
272 movhlps m5, m3272 movhlps m5, m3
273 273
274 %6 m0,m6,x,x,m7,m3274 %7 m0,m6,x,x,m7,m3
275 %6 m4,m1,x,x,m7,m3275 %7 m4,m1,x,x,m7,m3
276 %6 m2,m5,x,x,m7,m3276 %7 m2,m5,x,x,m7,m3
277 277
278 mov %+ %3 %+ ps [dstq ], m0278 mov %+ %3 %+ ps [dstq ], m0
279 mov %+ %3 %+ ps [dstq+16], m6279 mov %+ %3 %+ ps [dstq+16], m6
@@ -305,8 +305,8 @@ pack_6ch_%2_to_%1_u_int %+ SUFFIX: · 25 unmodified lines
305%endif305%endif
306%endmacro306%endmacro
307 307
308%macro UNPACK_6CH 5-7308%macro UNPACK_6CH 8
309cglobal unpack_6ch_%2_to_%1_%3, 2, 8, 8, dst, src, dst1, dst2, dst3, dst4, dst5, len309cglobal unpack_6ch_%2_to_%1_%3, 2, 8, %6, dst, src, dst1, dst2, dst3, dst4, dst5, len
310%if ARCH_X86_64310%if ARCH_X86_64
311 mov lend, r2d311 mov lend, r2d
312%else312%else
@@ -342,7 +342,7 @@ unpack_6ch_%2_to_%1_u_int %+ SUFFIX: · 29 unmodified lines
342 sub dst3q, dstq342 sub dst3q, dstq
343 sub dst4q, dstq343 sub dst4q, dstq
344 sub dst5q, dstq344 sub dst5q, dstq
345 %7 x,x,x,x,m7,x345 %8 x,x,x,x,m7,x
346.loop:346.loop:
347 mov%3 m0, [srcq ]347 mov%3 m0, [srcq ]
348 mov%3 m1, [srcq+16]348 mov%3 m1, [srcq+16]
@@ -360,9 +360,9 @@ unpack_6ch_%2_to_%1_u_int %+ SUFFIX: · 11 unmodified lines
360 SWAP 1, 4360 SWAP 1, 4
361 SWAP 2, 3361 SWAP 2, 3
362 362
363 %6 m0,m1,x,x,m7,m6363 %7 m0,m1,x,x,m7,m6
364 %6 m2,m3,x,x,m7,m6364 %7 m2,m3,x,x,m7,m6
365 %6 m4,m5,x,x,m7,m6365 %7 m4,m5,x,x,m7,m6
366 366
367 mov %+ %3 %+ ps [dstq ], m0367 mov %+ %3 %+ ps [dstq ], m0
368 mov %+ %3 %+ ps [dstq+dst1q], m1368 mov %+ %3 %+ ps [dstq+dst1q], m1
@@ -380,8 +380,8 @@ unpack_6ch_%2_to_%1_u_int %+ SUFFIX: · 11 unmodified lines
380 380
381%define PACK_8CH_GPRS (10 * ARCH_X86_64) + ((6 + HAVE_ALIGNED_STACK) * ARCH_X86_32)381%define PACK_8CH_GPRS (10 * ARCH_X86_64) + ((6 + HAVE_ALIGNED_STACK) * ARCH_X86_32)
382 382
383%macro PACK_8CH 5-7383%macro PACK_8CH 8
384cglobal pack_8ch_%2_to_%1_%3, 2,PACK_8CH_GPRS,10, ARCH_X86_32*48, dst, src, len, src1, src2, src3, src4, src5, src6, src7384cglobal 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
385 mov dstq, [dstq]385 mov dstq, [dstq]
386%if ARCH_X86_32386%if ARCH_X86_32
387 DEFINE_ARGS dst, src, src2, src3, src4, src5, src6387 DEFINE_ARGS dst, src, src2, src3, src4, src5, src6
@@ -463,7 +463,7 @@ pack_8ch_%2_to_%1_u_int %+ SUFFIX: · 75 unmodified lines
463%endif463%endif
464 464
465%if ARCH_X86_64465%if ARCH_X86_64
466 %7 x,x,x,x,m9,x466 %8 x,x,x,x,m9,x
467%elifidn %1, int32467%elifidn %1, int32
468 %define m9 [flt2p31]468 %define m9 [flt2p31]
469%else469%else
@@ -489,10 +489,10 @@ pack_8ch_%2_to_%1_u_int %+ SUFFIX: · 19 unmodified lines
489%if ARCH_X86_64489%if ARCH_X86_64
490 TRANSPOSE8x4D 0, 1, 2, 3, 4, 5, 6, 7, 8490 TRANSPOSE8x4D 0, 1, 2, 3, 4, 5, 6, 7, 8
491 491
492 %6 m0,m1,x,x,m9,m8492 %7 m0,m1,x,x,m9,m8
493 %6 m2,m3,x,x,m9,m8493 %7 m2,m3,x,x,m9,m8
494 %6 m4,m5,x,x,m9,m8494 %7 m4,m5,x,x,m9,m8
495 %6 m6,m7,x,x,m9,m8495 %7 m6,m7,x,x,m9,m8
496 496
497 mov%3 [dstq], m0497 mov%3 [dstq], m0
498%else498%else
@@ -500,12 +500,12 @@ pack_8ch_%2_to_%1_u_int %+ SUFFIX: · 1 unmodified line
500 500
501 TRANSPOSE8x4D 0, 1, 2, 3, 4, 5, 6, 7, [rsp], [rsp+16], 1501 TRANSPOSE8x4D 0, 1, 2, 3, 4, 5, 6, 7, [rsp], [rsp+16], 1
502 502
503 %6 m0,m1,x,x,m9,m2503 %7 m0,m1,x,x,m9,m2
504 mova m2, [rsp]504 mova m2, [rsp]
505 mov%3 [dstq], m0505 mov%3 [dstq], m0
506 %6 m2,m3,x,x,m9,m0506 %7 m2,m3,x,x,m9,m0
507 %6 m4,m5,x,x,m9,m0507 %7 m4,m5,x,x,m9,m0
508 %6 m6,m7,x,x,m9,m0508 %7 m6,m7,x,x,m9,m0
509 509
510%endif510%endif
511 511
@@ -614,15 +614,15 @@ CONV int32, int16, a, 2, 1, INT16_TO_INT32_N, NOP_N · 102 unmodified lines
614CONV int16, int32, u, 1, 2, INT32_TO_INT16_N, NOP_N614CONV int16, int32, u, 1, 2, INT32_TO_INT16_N, NOP_N
615CONV int16, int32, a, 1, 2, INT32_TO_INT16_N, NOP_N615CONV int16, int32, a, 1, 2, INT32_TO_INT16_N, NOP_N
616 616
617PACK_6CH float, float, u, 2, 2, NOP_N, NOP_N617PACK_6CH float, float, u, 2, 2, 0, NOP_N, NOP_N
618PACK_6CH float, float, a, 2, 2, NOP_N, NOP_N618PACK_6CH float, float, a, 2, 2, 0, NOP_N, NOP_N
619 619
620INIT_XMM sse620INIT_XMM sse
621PACK_6CH float, float, u, 2, 2, NOP_N, NOP_N621PACK_6CH float, float, u, 2, 2, 7, NOP_N, NOP_N
622PACK_6CH float, float, a, 2, 2, NOP_N, NOP_N622PACK_6CH float, float, a, 2, 2, 7, NOP_N, NOP_N
623 623
624UNPACK_6CH float, float, u, 2, 2, NOP_N, NOP_N624UNPACK_6CH float, float, u, 2, 2, 7, NOP_N, NOP_N
625UNPACK_6CH float, float, a, 2, 2, NOP_N, NOP_N625UNPACK_6CH float, float, a, 2, 2, 7, NOP_N, NOP_N
626 626
627INIT_XMM sse2627INIT_XMM sse2
628CONV int32, int16, u, 2, 1, INT16_TO_INT32_N, NOP_N628CONV 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
675UNPACK_2CH int16, float, u, 1, 2, FLOAT_TO_INT16_N, FLOAT_TO_INT16_INIT675UNPACK_2CH int16, float, u, 1, 2, FLOAT_TO_INT16_N, FLOAT_TO_INT16_INIT
676UNPACK_2CH int16, float, a, 1, 2, FLOAT_TO_INT16_N, FLOAT_TO_INT16_INIT676UNPACK_2CH int16, float, a, 1, 2, FLOAT_TO_INT16_N, FLOAT_TO_INT16_INIT
677 677
678PACK_6CH float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT678PACK_6CH float, int32, u, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
679PACK_6CH float, int32, a, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT679PACK_6CH float, int32, a, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
680PACK_6CH int32, float, u, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT680PACK_6CH int32, float, u, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
681PACK_6CH int32, float, a, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT681PACK_6CH int32, float, a, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
682 682
683UNPACK_6CH float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT683UNPACK_6CH float, int32, u, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
684UNPACK_6CH float, int32, a, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT684UNPACK_6CH float, int32, a, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
685UNPACK_6CH int32, float, u, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT685UNPACK_6CH int32, float, u, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
686UNPACK_6CH int32, float, a, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT686UNPACK_6CH int32, float, a, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
687 687
688PACK_8CH float, float, u, 2, 2, NOP_N, NOP_N688PACK_8CH float, float, u, 2, 2, 9, NOP_N, NOP_N
689PACK_8CH float, float, a, 2, 2, NOP_N, NOP_N689PACK_8CH float, float, a, 2, 2, 9, NOP_N, NOP_N
690 690
691PACK_8CH float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT691PACK_8CH float, int32, u, 2, 2, 10, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
692PACK_8CH float, int32, a, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT692PACK_8CH float, int32, a, 2, 2, 10, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
693PACK_8CH int32, float, u, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT693PACK_8CH int32, float, u, 2, 2, 10, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
694PACK_8CH int32, float, a, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT694PACK_8CH int32, float, a, 2, 2, 10, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
695 695
696INIT_XMM ssse3696INIT_XMM ssse3
697UNPACK_2CH int16, int16, u, 1, 1, NOP_N, NOP_N697UNPACK_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
703 703
704%if HAVE_AVX_EXTERNAL704%if HAVE_AVX_EXTERNAL
705INIT_XMM avx705INIT_XMM avx
706PACK_6CH float, float, u, 2, 2, NOP_N, NOP_N706PACK_6CH float, float, u, 2, 2, 8, NOP_N, NOP_N
707PACK_6CH float, float, a, 2, 2, NOP_N, NOP_N707PACK_6CH float, float, a, 2, 2, 8, NOP_N, NOP_N
708 708
709UNPACK_6CH float, float, u, 2, 2, NOP_N, NOP_N709UNPACK_6CH float, float, u, 2, 2, 8, NOP_N, NOP_N
710UNPACK_6CH float, float, a, 2, 2, NOP_N, NOP_N710UNPACK_6CH float, float, a, 2, 2, 8, NOP_N, NOP_N
711 711
712PACK_6CH float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT712PACK_6CH float, int32, u, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
713PACK_6CH float, int32, a, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT713PACK_6CH float, int32, a, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
714PACK_6CH int32, float, u, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT714PACK_6CH int32, float, u, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
715PACK_6CH int32, float, a, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT715PACK_6CH int32, float, a, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
716 716
717UNPACK_6CH float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT717UNPACK_6CH float, int32, u, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
718UNPACK_6CH float, int32, a, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT718UNPACK_6CH float, int32, a, 2, 2, 8, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
719UNPACK_6CH int32, float, u, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT719UNPACK_6CH int32, float, u, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
720UNPACK_6CH int32, float, a, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT720UNPACK_6CH int32, float, a, 2, 2, 8, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
721 721
722PACK_8CH float, float, u, 2, 2, NOP_N, NOP_N722PACK_8CH float, float, u, 2, 2, 9, NOP_N, NOP_N
723PACK_8CH float, float, a, 2, 2, NOP_N, NOP_N723PACK_8CH float, float, a, 2, 2, 9, NOP_N, NOP_N
724 724
725PACK_8CH float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT725PACK_8CH float, int32, u, 2, 2, 10, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
726PACK_8CH float, int32, a, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT726PACK_8CH float, int32, a, 2, 2, 10, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
727PACK_8CH int32, float, u, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT727PACK_8CH int32, float, u, 2, 2, 10, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
728PACK_8CH int32, float, a, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT728PACK_8CH int32, float, a, 2, 2, 10, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
729 729
730INIT_YMM avx730INIT_YMM avx
731CONV float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT731CONV 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