[FFmpeg-devel] [FFmpeg-devel-irc] IRC log for 2010-09-08

Michael Niedermayer michaelni
Fri Sep 10 00:20:00 CEST 2010

On Thu, Sep 09, 2010 at 06:02:00PM -0400, Ronald S. Bultje wrote:
> Hi,
> On Thu, Sep 9, 2010 at 5:52 PM, Reimar D?ffinger
> <Reimar.Doeffinger at gmx.de> wrote:
> > On Thu, Sep 09, 2010 at 05:22:10PM -0400, Ronald S. Bultje wrote:
> >> Our inline asm has huge issues on Win64, many which
> >> cannot be easily fixed.
> >
> > That I just don't see.
> As you know (you were the first to provide a patch for this), xmm6 and
> xmm7 on Win64 are callee-save.
> This means that any such construct...
> void function()
> {
>  asm("movd $0, xmm7\r\n", mem);
>  //something else
>  asm("movd xmm7, $0\r\n", mem);
> }
> ...cannot possibly be made to work. Putting xmm7 in the clobberlist
> doesn't preserve its value between asm() blocks, and not doing so
> screws up the caller's original xmm7 value. The solution in this
> particular mega-easy example is to merge the two asm blocks, but
> generally it's not that easy and the code needs a to be partially
> rewritten.

i feel like talking to people who want to burn everyone with red hair
as witches.
first you can just safe and restore xmm whatever by hand. yasm needs its
macros for this too

second gcc inline asm can just input and output things via xmm registers
like it can for integer registers. aka you make it a output of one and
input of the other asm()

third when writing yasm you need to write the whole function in pure asm
when you do the same with gcc the split problem doesnt exist so you are
really comparing cases that yasm cant handle at all

and of course you cannot inline yasm code nor mix it with C code, this
is the big disadvantage of yasm.
And awnsering every bug with "rewrite it to yasm" really sounds so childish
i dunno.
Try this please:
"Ive analyzed the code and determined that we never want to inline it, thus
the disadvantages of yasm dont matter here ..."

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- 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/20100910/c68e7663/attachment.pgp>

More information about the ffmpeg-devel mailing list