[FFmpeg-devel] [PATCH] Fix compilation with 64-bit MinGW

Måns Rullgård mans
Sun Oct 19 20:20:37 CEST 2008


Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:

> On Sun, Oct 19, 2008 at 05:52:58PM +0100, M?ns Rullg?rd wrote:
>> Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
>> > Index: libavcodec/i386/dsputil_mmx.c
>> > ===================================================================
>> > --- libavcodec/i386/dsputil_mmx.c	(revision 15647)
>> > +++ libavcodec/i386/dsputil_mmx.c	(working copy)
>> > @@ -2239,6 +2239,7 @@
>> >  }
>> >
>> >  static void float_to_int16_3dnow(int16_t *dst, const float *src, long len){
>> > +    x86_reg reglen = len;
>> >      // not bit-exact: pf2id uses different rounding than C and SSE
>> >      __asm__ volatile(
>> >          "add        %0          , %0        \n\t"
>> > @@ -2257,10 +2258,11 @@
>> >          "add        $16         , %0        \n\t"
>> >          " js 1b                             \n\t"
>> >          "femms                              \n\t"
>> > -        :"+r"(len), "+r"(dst), "+r"(src)
>> > +        :"+r"(reglen), "+r"(dst), "+r"(src)
>> 
>> Why not "+r"((x86_reg)len)?
>
> Because it does not compile, +r needs an lvalue.

Of course it does.  I was remembering some similar case where the
value was only read.  GCC asm constraints are evil...

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list