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

İsmail Dönmez ismail at kde.org.tr
Tue Jul 12 17:11:32 CEST 2005


Hi,
On Tue, Jul 12, 2005 at 05:03:36PM +0200, Guillaume POIRIER wrote:
> 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"

How about this? ( Notice >= as gcc 3.4 compiles this code fine )

#if defined(ARCH_X86_64) && (GCC_VERSION >= 30400)
...
#endif

ismail

--
Animals use pee to mark their territories. Humans use others' girl friends
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050712/ab558dc5/attachment.pgp>


More information about the MPlayer-dev-eng mailing list