[Ffmpeg-devel] ARCH_X86 vs ARCH_X86_32 vs ARCH_X86_64

Aurelien Jacobs aurel
Tue Oct 17 12:35:32 CEST 2006


On Tue, 17 Oct 2006 12:04:37 +0200
Diego Biurrun <diego at biurrun.de> wrote:

> On Mon, Oct 16, 2006 at 11:04:19PM +0200, Diego Biurrun wrote:
> > On Mon, Oct 16, 2006 at 11:00:59PM +0200, Diego Biurrun wrote:
> > > On Sun, Oct 08, 2006 at 11:55:55PM +0200, Diego Biurrun wrote:
> > > > I'd like to introduce a define that encompasses both x86 and x86_64 to
> > > > simplify statements like
> > > > 
> > > >   #if defined(ARCH_X86) || defined(ARCH_X86_64)
> > > > 
> > > > of which we have tons in the code and be able to use it in the Makefiles
> > > > where or expressions are troublesome.
> > > > 
> > > > My first idea was to rename ARCH_X86 --> ARCH_X86_32 and use ARCH_X86
> > > > for the general case.  It seems like the cleanest and most
> > > > straightforward solution to me, but I'm getting second thoughts.  I'm
> > > > afraid that ARCH_X86 semantics are kind of set in stone through years of
> > > > usage (in autoconf as well).
> > > 
> > > OK, here is a first patch that introduces ARCH_X86_32.  Testing welcome.
> > > 
> > > --- libavutil/internal.h	(revision 6713)
> > > +++ libavutil/internal.h	(working copy)
> > > @@ -217,7 +217,7 @@
> > >  static always_inline long int lrintf(float x)
> > >  {
> > >  #ifdef __MINGW32__
> > > -#  ifdef ARCH_X86
> > > +#  ifdef ARCH_X86_32
> > >      int32_t i;
> > >      asm volatile(
> > >          "fistpl %0\n\t"
> > 
> > Note: I suspect that most or all of these conditions are bogus and might
> > well work on x86_64 as well.  Somebody please replace them all by
> > ARCH_X86_64 and test that as well.
> 
> Reimar tested except the MinGW one in libavutil/common.h, they are all
> necessary.  So if somebody runs MinGW on his AMD64 ..

Afaik MinGW doesn't support amd64. I mean, it won't produce 64bits binary.
So for now, mingw32 asm should be under ARCH_X86_32.

Aurel




More information about the ffmpeg-devel mailing list