On Fri, May 11, 2012 at 05:31:52PM +0200, Christophe Gisquet wrote:
> 2012/5/11 Diego Biurrun <[email protected]>:
> [...]
> 
> Not limited to that patch: could the reporter state instead on what
> instruction the sigill occurred? It may be possible to do something
> else.

(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x89c6019 to 0x89c6059:
0x089c6019 <ff_rv40_weight_func_rnd_16_mmx+25>: jl     0x89c603f 
<ff_rv40_weight_func_rnd_
0x089c601b <ff_rv40_weight_func_rnd_16_mmx+27>: sub    %cl,(%edi)
0x089c601d <ff_rv40_weight_func_rnd_16_mmx+29>: outsl  %ds:(%esi),(%dx)
0x089c601e <ff_rv40_weight_func_rnd_16_mmx+30>: or     $0x8b908b0,%eax
0x089c6023 <ff_rv40_weight_func_rnd_16_mmx+35>: pxor   %mm0,%mm0
0x089c6026 <ff_rv40_weight_func_rnd_16_mmx+38>: mov    %edi,%ebp
0x089c6028 <ff_rv40_weight_func_rnd_16_mmx+40>: shl    $0x4,%ebp
0x089c602b <ff_rv40_weight_func_rnd_16_mmx+43>: add    %ebp,%eax
0x089c602d <ff_rv40_weight_func_rnd_16_mmx+45>: add    %ebp,%ecx
0x089c602f <ff_rv40_weight_func_rnd_16_mmx+47>: add    %ebp,%edx
0x089c6031 <ff_rv40_weight_func_rnd_16_mmx+49>: neg    %ebp
0x089c6033 <ff_rv40_weight_func_rnd_16_mmx+51>: movd   %ebx,%mm2
0x089c6036 <ff_rv40_weight_func_rnd_16_mmx+54>: movd   %esi,%mm3
0x089c6039 <ff_rv40_weight_func_rnd_16_mmx+57>: pshufw $0x0,%mm2,%mm2
0x089c603d <ff_rv40_weight_func_rnd_16_mmx+61>: pshufw $0x0,%mm3,%mm3
0x089c6041 <ff_rv40_weight_func_rnd_16_mmx.loop+0>:     movd   
(%ecx,%ebp,1),%mm4
0x089c6045 <ff_rv40_weight_func_rnd_16_mmx.loop+4>:     movd   
(%edx,%ebp,1),%mm5
0x089c6049 <ff_rv40_weight_func_rnd_16_mmx.loop+8>:     movd   
0x4(%ecx,%ebp,1),%mm6
0x089c604e <ff_rv40_weight_func_rnd_16_mmx.loop+13>:    movd   
0x4(%edx,%ebp,1),%mm7
0x089c6053 <ff_rv40_weight_func_rnd_16_mmx.loop+18>:    punpcklbw %mm0,%mm4
0x089c6056 <ff_rv40_weight_func_rnd_16_mmx.loop+21>:    punpcklbw %mm0,%mm5

> From f3eb743a32e959e6129d681e7da9bf14a079d51d Mon Sep 17 00:00:00 2001
> From: Christophe Gisquet <[email protected]>
> Date: Fri, 11 May 2012 17:27:11 +0200
> Subject: [PATCH 12/12] rv40dsp x86: replace SSE instruction in MMX2 code
> 
> movhps is an SSE instruction.
> --- a/libavcodec/x86/rv40dsp.asm
> +++ b/libavcodec/x86/rv40dsp.asm
> @@ -579,7 +579,12 @@ FILTER_SSSE3  avg
>      sub        r6, r5
>      movh       [%2 + r6], m4
>      add        r6, r5
> +%if cpuflag(mmx)
> +    punpckhdq  m4, m4
> +    movh       [%2 + r6], m4
> +%else
>      movhps     [%2 + r6], m4
> +%endif
>  %else
>      mova       [%2 + r6], m4
>  %endif

This does not fix the sigill I was experiencing.  Then again, my CPU does
not have MMX2 in the first place.  Did you test on such a CPU?

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to