On Mon, Jul 30, 2012 at 01:48:09PM -0400, Justin Ruggles wrote:
> 
> --- a/libavcodec/x86/fmtconvert.asm
> +++ b/libavcodec/x86/fmtconvert.asm
> @@ -27,18 +27,20 @@ SECTION_TEXT
>  
> ;---------------------------------------------------------------------------------
>  ; void int32_to_float_fmul_scalar(float *dst, const int *src, float mul, int 
> len);
>  
> ;---------------------------------------------------------------------------------
> -%macro INT32_TO_FLOAT_FMUL_SCALAR 2
> +%macro INT32_TO_FLOAT_FMUL_SCALAR 0
>  %if UNIX64
> -cglobal int32_to_float_fmul_scalar_%1, 3,3,%2, dst, src, len
> +cglobal int32_to_float_fmul_scalar, 3,3,5, dst, src, len
>  %else
> -cglobal int32_to_float_fmul_scalar_%1, 4,4,%2, dst, src, mul, len
> +cglobal int32_to_float_fmul_scalar, 4,4,5, dst, src, mul, len
>  %endif
> @@ -64,14 +66,10 @@ cglobal int32_to_float_fmul_scalar_%1, 4,4,%2, dst, src, 
> mul, len
>  
> -INIT_XMM
> -%define SPLATD SPLATD_SSE
> -%define movdqa movaps
> -INT32_TO_FLOAT_FMUL_SCALAR sse, 5
> -%undef movdqa
> -%define SPLATD SPLATD_SSE2
> -INT32_TO_FLOAT_FMUL_SCALAR sse2, 3
> -%undef SPLATD
> +INIT_XMM sse
> +INT32_TO_FLOAT_FMUL_SCALAR
> +INIT_XMM sse2
> +INT32_TO_FLOAT_FMUL_SCALAR

This general cpuflags porting is not really related.  I would suggest
rebasing this on top of my patch that ports fmtconvert.asm to cpuflags
so that your patch becomes smaller.

> --- a/libavutil/x86/x86util.asm
> +++ b/libavutil/x86/x86util.asm
> @@ -559,24 +559,34 @@
>  
> +; splat low dword or m32 to all dwords
> +; %1 = dst/src mmreg, %2 = src m32 (optional)
> +%macro SPLATD 1-2
> +%if %0 > 1 && notcpuflag(avx)
> +    %if mmsize == 8 || cpuflag(sse2)
> +    movd   %1, %2
> +    %else
> +    movss  %1, %2
> +    %endif
>  %endif
> +%if mmsize == 8
>      punpckldq  %1, %1
> +%elif mmsize == 16
> +    %if %0 > 1 && cpuflag(avx)
> +    vbroadcastss %1, %2
> +    %elif cpuflag(sse2)
>      pshufd  %1, %1, 0
> +    %else ; sse
> +    shufps  %1, %1, 0
> +    %endif
> +%elif mmsize == 32
> +    %if %0 > 1
> +    vbroadcastss %1, %2
> +    %else
> +    vperm2f128 %1, %1, %1, 0
> +    shufps     %1, %1, 0
> +    %endif
> +%endif

I think you should indent the code one more step after an indented %if.

Diego
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to