[MPlayer-dev-eng] [PATCH] Maybe fix gcc4 for problems on amd64 without breaking other arches

Guillaume POIRIER poirierg at gmail.com
Tue Jul 12 17:03:36 CEST 2005


Hi,

On 7/12/05, Guillaume POIRIER <poirierg at gmail.com> wrote:
> Hi,
> 
> On 7/12/05, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> > Hi,
> > On Tue, Jul 12, 2005 at 11:15:24AM +0200, Reimar D?ffinger wrote:
> > > On Tue, Jul 12, 2005 at 10:51:27AM +0200, Guillaume POIRIER wrote:
> > > > Here's what I think is a better patch that conditionally compiles
> > > > either version of the problematic line depending on the GCC version.
> > >
> > > Why should this be better? This means MPlayer won't compile with gcc 3.4
> > > on AMD64!
> >
> > Well, I mixed it up, sorry..
> 
> :-)
> 
> > Nevertheless i think the previous version
> > might be better in general, since it allows the compiler to use a
> > register on AMD64, and there are enough registers, in theory it might be
> > a bit better performance-wise...
> 
> I'm okay with that, it's just that GCC-3.3 on AMD-64 will probably
> fail on generate proper code (though I did not test), just like it
> does on IA-32. Therefore, the solution may be to test against GCC
> version (if greater of equal to 3.4) and ARCH type.

Mmmm, I'm not a pre-processor wiz, so I'm wondering how to cleanly
combine the #if (GCC_VERSION > 30400) with the #ifdef ARCH_X86_64

#ifdef ARCH_X86_64
#if (GCC_VERSION > 30400)
:: "m" (src1), "m" (dst), "g" ((long)dstWidth), "m" (xInc_shr16), "m"
(xInc_mask),
#endif
#else
:: "m" (src1), "m" (dst), "m" ((long)dstWidth), "m" (xInc_shr16), "m"
(xInc_mask),
#endif

Is this all right?

Guillaume
-- 
A lie gets halfway around the world before the truth has a chance to
get its pants on.
 -- Winston Churchill




More information about the MPlayer-dev-eng mailing list