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

Ramiro Polla ramiro.polla
Thu Sep 30 21:02:00 CEST 2010


2010/9/30 M?ns Rullg?rd <mans at mansr.com>:
> Ramiro Polla <ramiro.polla at gmail.com> writes:
>> 2010/9/30 M?ns Rullg?rd <mans at mansr.com>:
>>> Ramiro Polla <ramiro.polla at gmail.com> writes:
>>>> What about
>>>> #if HAVE_XMM_CLOBBERS
>>>> # ? ?define XMM_CLOBBERS(a, ...) __VA_ARGS__
>>>> #else
>>>> # ? ?define XMM_CLOBBERS(a, ...) a
>>>> #endif
>>>>
>>>> to be used as in lavc/x86/fft_sse.c:
>>>> ? ? ? ? :"+r"(j), "+r"(k)
>>>> ? ? ? ? :"r"(output+n4), "r"(output+n4*3),
>>>> ? ? ? ? ?"m"(*m1m1m1m1)
>>>> ? ? ? ? XMM_CLOBBERS(, : "%xmm0", "%xmm1", "%xmm7")
>>>> ? ? );
>>>
>>> That falls over if any other clobbers are needed.
>>
>> If any other clobbers are needed they could be written before the macro.
>
> That won't work.

: "eax" XMM_CLOBBERS(,, "%xmm0", "%xmm1", "%xmm7")

But I agree having "cc" as dummy is simpler.



More information about the ffmpeg-devel mailing list