[MPlayer-dev-eng] [PATCH] TOOLS/cpuinfo.c: correct k6_mtrr detection
Guillaume Poirier
guillaume.poirier at etudiant.univ-rennes1.fr
Wed Nov 23 14:32:59 CET 2005
Reimar at mplayerhq.hu wrote:
> Hi,
> On Wed, Nov 23, 2005 at 10:41:21AM +0100, Guillaume Poirier wrote:
>
>>Zuxy wrote:
>>
>>>Two years ago Diego added '{ 32, "k6_mtrr", "Memory Type Range
>>>Registers" }' to TOOLS/cpuinfo.c. However, the instruction "sal eax,
>>>32" is in effect identical to "sal eax, 0", so what cpuinfo.c really
>>>checked is bit 0 of the extended feature string, i.e. built-in FPU. As
>>>a consequence k6_mtrr was reported on virtually every AMD CPU.
>>>However, only some K6-2 and K6-III supports this type of MTRR,
>>>including neither K6, which dosen't have any MTRR, nor Athlons, which
>>>implement MTRR in a way compliant with Intel P6.
>>>
>>>The attached patch corrects this, plus a lot of new feature bits that
>>>pave the way for future optimizations to mplayer, including SSE3.
>>
>>This patch works as expected on the machines I've tested it. I'll commit
>>it this week in no one objects.
>
>
> But get rid of the cosmetics. And fix the indentations of the amd_flags2
> variable lines.
I'll fix it before committing it. Having a closer look at the code, it
appears to me that this chunk of code will deserve a cometics only
commit to fix the indentation that mixes tabs and spaces.
I hope I won't trigger a flame cosmetics war by saying this... :-(
Guillaume
More information about the MPlayer-dev-eng
mailing list