[MPlayer-dev-eng] [PATCH] SSE support for cygwin/mingw
Arpi
arpi at thot.banki.hu
Sat Jul 5 15:41:03 CEST 2003
Hi,
> > > loader/win32.c it can return sse availability for win32 apps:
> > >
> > > if (gCpuCaps.hasMMX)
> > > PF[PF_MMX_INSTRUCTIONS_AVAILABLE] = TRUE;
> > > if (gCpuCaps.hasSSE)
> > > PF[PF_XMMI_INSTRUCTIONS_AVAILABLE] = TRUE;
> > > if (gCpuCaps.has3DNow)
> > > PF[PF_AMD3D_INSTRUCTIONS_AVAILABLE] = TRUE;
> >
> > or maybe it's IsProcessorFeaturePresent(), after looking again at win32.c
> >
>
> So we should do our cpucheck first and later compare the results to the ones
> from IsProcessorFeaturePresent? What about
> gCpuCaps.hasMMX2
> gCpuCaps.hasSSE2
> gCpuCaps.has3DNowExt
> are they used in the mplayer codebase?
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/bas
> e/isprocessorfeaturepresent.asp
> doesn't list them
they are extensions of mmx, sse, 3dnow, not new things with new registers.
so you should do teh same as on linux, use teh cpuid instruction to check
which extensions are available, but query if the OS also supports them, and
disable if not.
so, if MMX and MMXEXT are supported by cpu, but no MMX support by OS, then
disable both.
if SSE or SSE and SSE2 are supported by CPU, but no SSE support in OS,
disable them.
ie. replace the sysctl() (BSD) or signal() (linux) hack by
isprocessorfeaturepresent()
A'rpi / Astral & ESP-team
--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu
More information about the MPlayer-dev-eng
mailing list