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

Ramiro Polla ramiro.polla
Thu Sep 30 17:14:15 CEST 2010

On Thu, Sep 30, 2010 at 11:01 AM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> 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).

That's a good idea, but it's a little trickier on asm that has no
clobbers besides the xmm regs. For that I've created a second macro.
Patch attached to add it and another patch as example is for fft_sse.c
(which fixes a fate failure on win64).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmm_clobbers.diff
Type: application/octet-stream
Size: 1088 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100930/2fea370c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fft_sse_xmm_clobbers.diff
Type: application/octet-stream
Size: 411 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100930/2fea370c/attachment-0001.obj>

More information about the ffmpeg-devel mailing list