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

Michael Niedermayer michaelni
Tue Sep 28 21:31:56 CEST 2010


On Tue, Sep 28, 2010 at 07:54:15PM +0100, M?ns Rullg?rd wrote:
> 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.

you are somehow apparently missing the point.
its not hard to split in the case where someone does report a matching
invalid opcode exception on pre SSE.
This plain and simple reduces the work&time spend because its likely that if
it works now it will continue to do so, or as the saying goes
if it aint broken dont fix it.
Also no real hardware is free of occasional errors nor is software especially
not gcc nor the gcc docs so absolutely guranteed correctness is meaningless
what matters is how likely failure is and what such failure means 
and here its exceedingly unlikely to fail if it works on all platforms now
and failure just means we need to do the split that we otherwise already need
to do. So it doesnt cost anything but could safe doing unneeded work

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100928/33c9215f/attachment.pgp>



More information about the ffmpeg-devel mailing list