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

Ronald S. Bultje rsbultje
Thu Sep 30 16:01:11 CEST 2010


Hi,

2010/9/28 M?ns Rullg?rd <mans at mansr.com>:
> Michael Niedermayer <michaelni at gmx.at> writes:
>> 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
>
> That would allow the compiler to use SSE instructions in functions
> that should be MMX only.

I'm gonna start kicking this subject until it's solved. Come on guys,
keep this moving. Why don't we make it (the clobbering) a macro and
only enable this on x86-64. Don't forget all xmm registers are
caller-save on x86-32 and x86-64 has no issues with marking clobbers
(and even if it did, -msse is fine, there is no single x86-64 CPU that
does not support SSE). We could consider making it as simple as :::
CLOBBER_IF_X86_64("%xmm6", "%xmm7",) "%eax" which evaluates to the
string in it (including commas) on x86-64 and nothing on x86-32 (and
omit the comma if that's the only thing in the clobberlist).

Ronald



More information about the ffmpeg-devel mailing list