[FFmpeg-devel] [RFC] clobbers for XMM registers

Måns Rullgård mans
Tue Sep 28 20:54:15 CEST 2010


Michael Niedermayer <michaelni at gmx.at> writes:

> On Tue, Sep 28, 2010 at 11:49:04AM -0400, Ronald S. Bultje wrote:
>> Hi,
>> 
>> On Tue, Sep 28, 2010 at 11:28 AM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
>> > On Tue, Sep 28, 2010 at 11:34 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> >> On Tue, Sep 28, 2010 at 10:32:41AM -0400, Ronald S. Bultje wrote:
>> >>> On Tue, Sep 28, 2010 at 10:19 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> >>> > On Tue, Sep 28, 2010 at 10:15:29AM -0400, Ronald S. Bultje wrote:
>> >>> >> On Tue, Sep 28, 2010 at 10:09 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> >>> >> > On Tue, Sep 28, 2010 at 09:36:40AM -0400, Ronald S. Bultje wrote:
>> >>> >> >> On Tue, Sep 28, 2010 at 8:34 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> >>> >> >> > you want to execute code from vp3dsp_sse2.c on a pre SSE cpu?
>> >>> >> >>
>> >>> >> >> All _sse2 files are templates files that are included in
>> >>> >> >> dsputil_mmx.c or similar.
>> >>> >> >
>> >>> >> > we could add the flags to dsputil_mmx then or split the file.
>> >>> >>
>> >>> >> Before splitting, can someone first confirm that -msse
>> >>> >> actually fixes it?
>> >>> >
>> >>> > i cant confirm that it fixes it as i dont have an affected
>> >>> >platform but it definitly fails here with an identical looking
>> >>> >error if i pass -mno-sse
>> >>>
>> >>> I would feel safer if someone on BSD/Win of one of the affected FATE
>> >>> platforms could confirm that this fixes the issue.
>> >>
>> >> of course
>> >
>> > $ cat clobber.c
>> > void foo(void)
>> > {
>> > ? ?asm("nop\n\t"::: "xmm0");
>> > }
>> > $ i686-mingw32-gcc-4.4 -o /dev/null -c clobber.c
>> > clobber.c: In function 'foo':
>> > clobber.c:3: error: unknown register name 'xmm0' in 'asm'
>> > $ i686-mingw32-gcc-4.4 -o /dev/null -c clobber.c -msse
>> > $
>> 
>> Thanks. So Michael, you volunteer to split the files? :-).
>
> if adding -msse to dsputil_mmx.c breaks in the real universe i might
> split it,
> does it break?

Regardless of how many successful tests are made, nobody can guarantee
that it will always work with all compilers on all systems in all
configurations.

Never rely on unintentional behaviour.  Just don't.  End of story.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list