[FFmpeg-devel] Fwd: [PATCH] videodsp_init: Restrict to SSE2.

Stephen Hutchinson qyot27 at gmail.com
Wed Oct 9 19:54:49 CEST 2013

On Wed, Oct 9, 2013 at 12:44 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> Hi,
> On Wed, Oct 9, 2013 at 12:40 PM, Stephen Hutchinson <qyot27 at gmail.com>
> wrote:
>> On Wed, Oct 9, 2013 at 12:18 PM, Ronald S. Bultje <rsbultje at gmail.com>
>> wrote:
>>> Which instruction does it crash on (in gdb: 'disass' and 'info
>>> all-registers')?
>> I'll have to rebuild to get the output of info all-registers, but the
>> disass is:
>> (gdb) disass $pc-32,$pc+32
>> Dump of assembler code from 0xabf779 to 0xabf7b9:
>>    0x00abf779 <ff_emu_edge_vfix21_sse+9>:       adc    $0x8b,%al
>>    0x00abf77b <ff_emu_edge_vfix21_sse+11>:      push   %esp
>>    0x00abf77c <ff_emu_edge_vfix21_sse+12>:      and    $0x1c,%al
>>    0x00abf77e <ff_emu_edge_vfix21_sse+14>:      mov    0x20(%esp),%ebx
>>    0x00abf782 <ff_emu_edge_vfix21_sse+18>:      mov    0x24(%esp),%esi
>>    0x00abf786 <ff_emu_edge_vfix21_sse+22>:      sub    %ebx,%esi
>>    0x00abf788 <ff_emu_edge_vfix21_sse+24>:      sub    %edx,%ebx
>>    0x00abf78a <ff_emu_edge_vfix21_sse+26>:      test   %edx,%edx
>>    0x00abf78c <ff_emu_edge_vfix21_sse+28>:      je     0xabf7a5
>> <ff_emu_edge_vfix21_sse+53
>> >
>>    0x00abf78e <ff_emu_edge_vfix21_sse+30>:      movups (%ecx),%xmm0
>>    0x00abf791 <ff_emu_edge_vfix21_sse+33>:      movq   0xd(%ecx),%xmm1
>>    0x00abf796 <ff_emu_edge_vfix21_sse+38>:      movups %xmm0,(%eax)
>> => 0x00abf799 <ff_emu_edge_vfix21_sse+41>:      movq   %xmm1,0xd(%eax)
>>    0x00abf79e <ff_emu_edge_vfix21_sse+46>:      add    0x10(%esp),%eax
>>    0x00abf7a2 <ff_emu_edge_vfix21_sse+50>:      dec    %edx
>>    0x00abf7a3 <ff_emu_edge_vfix21_sse+51>:      jne    0xabf796
>> <ff_emu_edge_vfix21_sse+38
>> >
>>    0x00abf7a5 <ff_emu_edge_vfix21_sse+53>:      movups (%ecx),%xmm0
>>    0x00abf7a8 <ff_emu_edge_vfix21_sse+56>:      movq   0xd(%ecx),%xmm1
>>    0x00abf7ad <ff_emu_edge_vfix21_sse+61>:      movups %xmm0,(%eax)
>>    0x00abf7b0 <ff_emu_edge_vfix21_sse+64>:      movq   %xmm1,0xd(%eax)
>>    0x00abf7b5 <ff_emu_edge_vfix21_sse+69>:      add    0x10(%esp),%eax
>> End of assembler dump.
>> (gdb)
>> and disabling line 213 in videodsp.asm stopped the SIGILL but
>> it obviously causes the output video to be distorted.
> Hm right should probably be replaced by movlps (if we want to continue using
> xmm registers), or replace with a movq to a mmx register. Loren, any
> opinions on changing x86inc.asm to assign movlps (instead of movq) to movh
> if we're sse but not sse2 (similar to how we use movaps/movups instead of
> movdqa/movdqu for mova/movu)?
> Ronald

It seems Gmail must have screwed up on my first reply, since neither
of the responses are showing up on FFmpeg-devel.  I'll force this one
to Cc: over there to make sure.

Also, a more complete backtrace against a newer build and with 'info
all-registers' present is posted on the ticket itself:

More information about the ffmpeg-devel mailing list