[MPlayer-dev-eng] Re: [PATCH] Various improvement in TOOLS/cpuinfo.c

Michael Niedermayer michaelni at gmx.at
Wed May 17 22:16:51 CEST 2006


Hi

On Thu, May 18, 2006 at 02:38:25AM +0800, Zuxy Meng wrote:
> 2006/5/16, Zuxy Meng <zuxy.meng at gmail.com>:
> >2006/5/16, Guillaume POIRIER <poirierg at gmail.com>:
> >> Hi,
> >>
> >> On 5/15/06, Zuxy Meng <zuxy.meng at gmail.com> wrote:
> >> > Hi,
> >> >
> >> > 2006/5/16, Guillaume POIRIER <poirierg at gmail.com>:
> >> > > Hi,
> >> > >
> >> > >
> >> > > Ok, good to know. The previous version (before last night) wasn't
> >> > > working on amd64 anyhow, so at least your patch fixes a known
> >> > > regression.
> >> > >
> >> > > I'm sure there's a way to support "macintel", amd64 and ia34...
> >> >
> >> > Will gcc define a macro like TARGET_64BIT under amd64?
> >>
> >> Maybe it does, I have not been able to find much information about it
> >> besides http://gcc.gnu.org/onlinedocs/gccint/Defining-Mode-Macros.html
> >> and http://gcc.gnu.org/onlinedocs/gccint/Examples.html
> >>
> >> The simplest way is probably to test on an amd64 machine.
> >
> >Would please try __x86_64__? See if it's defined under amd64, and
> >undefined under x86 and amd64 with -m32.
> >
> >>
> >> In any case, no need to worry, the patch you sent today works on AMD64
> >> (I just checked now as I'm home).
> >>
> >
> >It might work, if the context use rbx as a 32 bit int; it mighty fail,
> >if the context use rbx as a 64 bit pointer. There's no guarantee
> >here:-(
> 
> I checked gcc's source and confirmed that __x86_64__ would indicate
> that we're under x86_64, so the attached patch should be OK.
[...]
> +#ifdef __x86_64__
> +  asm("mov %%rbx, %%rsi\n\t"
> +#else
>    asm("mov %%ebx, %%esi\n\t" 
> +#endif

any special reason why you dont use REG_S / REG_b defines here?


[...]

-- 
Michael

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the MPlayer-dev-eng mailing list