[MPlayer-dev-eng] cpuid vs 386 vs 486
Arpi
arpi at thot.banki.hu
Tue Feb 5 23:03:22 CET 2002
Hi,
hmm. where is __CPU__ defined? internal of gcc ?
> Hi
>
> On Tuesday 05 February 2002 22:28, Arpi wrote:
> > Hi,
> >
> > it probably uses BSWAP. It's specific to 486+ cpus, and common in these
> > codecs.
> bswap.h:
> ---------------------------------
> inline static unsigned int ByteSwap32(unsigned int x)
> {
> #if __CPU__ > 386
> __asm("bswap %0":
> "=r" (x) :
> #else
> __asm("xchgb %b0,%h0\n"
> " rorl $16,%0\n"
> " xchgb %b0,%h0":
> "=q" (x) :
> #endif
> "0" (x));
> return x;
> }
> ----------------------------------
> so it wont work if its compiled on 486+ and executed on 386
> runtime cpudetect detect is imho not worth it here, and would have a serious
> impact on performance as this is used in the bitstream reader which is called
> alot
>
> [...]
> Michael
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
>
A'rpi / Astral & ESP-team
--
"I don't RTFM? Wow. What's the meaning of this? It's new for me."
-- Martin Baum, a tipical MPlayer user...
More information about the MPlayer-dev-eng
mailing list