[MPlayer-dev-eng] Display more cpuflags
Josh
joshf87 at live.com
Mon Oct 22 03:49:08 CEST 2012
On 10/21/2012 21:24, Xidorn Quan wrote:
> On Mon, Oct 22, 2012 at 9:08 AM, Josh <joshf87 at live.com> wrote:
>
>> Rather simple, it adds SSE4, SSE4.2 and AVX to the 'Cpuflags:' line and
>> report if they were compiled with them in the case of not using runtime cpu
>> detection. Test on my i7-2600k (chose to disable AVX):
>>
>> CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSSE3: 1
>> SSE4: 1 SSE4.2: 1 AVX: 1
>> Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 SSSE3 SSE4 SSE4.2
>> CMOV
>>
> Why not add SSE3 as well? It isn't the same as SSSE3.
> One more question, CMOV is also a CPU flag, and AVX is a extension, too.
> Why are they absent in those sides?
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
>
Here's for SSE3. As for including CMOV to "Cpuflags:", I don't see
anything in cpudetect.c for a "hasCMOV" or anything.
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSE3: 1
SSSE3: 1 SSE4: 1 SSE4.2: 1 AVX: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 SSE3 SSSE3 SSE4
SSE4.2 AVX CMOV
-------------- next part --------------
Index: mpcommon.c
===================================================================
--- mpcommon.c (revision 35265)
+++ mpcommon.c (working copy)
@@ -74,10 +74,11 @@
GetCpuCaps(&gCpuCaps);
#if ARCH_X86
mp_msg(MSGT_CPLAYER, MSGL_V,
- "CPUflags: MMX: %d MMX2: %d 3DNow: %d 3DNowExt: %d SSE: %d SSE2: %d SSSE3: %d\n",
+ "CPUflags: MMX: %d MMX2: %d 3DNow: %d 3DNowExt: %d SSE: %d SSE2: %d SSSE3: %d SSE4: %d SSE4.2: %d AVX: %d\n",
gCpuCaps.hasMMX, gCpuCaps.hasMMX2,
gCpuCaps.has3DNow, gCpuCaps.has3DNowExt,
- gCpuCaps.hasSSE, gCpuCaps.hasSSE2, gCpuCaps.hasSSSE3);
+ gCpuCaps.hasSSE, gCpuCaps.hasSSE2, gCpuCaps.hasSSSE3,
+ gCpuCaps.hasSSE4, gCpuCaps.hasSSE42, gCpuCaps.hasAVX);
#if CONFIG_RUNTIME_CPUDETECT
mp_msg(MSGT_CPLAYER, MSGL_V, "Compiled with runtime CPU detection.\n");
#else
@@ -96,6 +97,12 @@
mp_msg(MSGT_CPLAYER,MSGL_V," SSE2");
if (HAVE_SSSE3)
mp_msg(MSGT_CPLAYER,MSGL_V," SSSE3");
+if (HAVE_SSE4)
+ mp_msg(MSGT_CPLAYER,MSGL_V," SSE4");
+if (HAVE_SSE42)
+ mp_msg(MSGT_CPLAYER,MSGL_V," SSE4.2");
+if (HAVE_AVX)
+ mp_msg(MSGT_CPLAYER,MSGL_V," AVX");
if (HAVE_CMOV)
mp_msg(MSGT_CPLAYER,MSGL_V," CMOV");
mp_msg(MSGT_CPLAYER,MSGL_V,"\n");
More information about the MPlayer-dev-eng
mailing list