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

Ramiro Polla ramiro.polla
Tue Sep 28 23:02:11 CEST 2010


2010/9/28 M?ns Rullg?rd <mans at mansr.com>:
> Ramiro Polla <ramiro.polla at gmail.com> writes:
>> 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
>> $
>
> Why is this different on Windows?

I think the issue here is multilib or not. I think mik's gccs that
were built with --target=i686 or whatever have failed, but the ones
that were built with multilib and used -m32 in FATE's configuration
didn't (so -m32 is not disabling xmm registers). For example, this one
compiled fine: http://fate.ffmpeg.org/x86_32-freebsd-clang/20100825203638
, while the other ones didn't. My cygwin/mingw32 builds are are built
only for i686.

I'm getting rather annoyed at the incredible amount of grep-less
levels of indirection in gcc's source code. (wtf does TARGET_SSE in
i386.c evaluate to?). Also gcc is taking ages to compile multilib on
my box for me to be certain, can someone else please test?



More information about the ffmpeg-devel mailing list