- Fixed: The aliasing of CPUInfo was still wrong. (Yarr! The things I do

for you, GCC!) The AMD feature flags weren't stored anywhere, either; not
  that it really matters.


SVN r1794 (trunk)
This commit is contained in:
Randy Heit 2009-09-05 03:28:58 +00:00
parent b528b987da
commit 7da43069d7
3 changed files with 13 additions and 10 deletions

View file

@ -2,6 +2,9 @@ September 5, 2009 (Changes by Graf Zahl)
- made menu dimming a mapping option but kept the CVARS as user override. - made menu dimming a mapping option but kept the CVARS as user override.
September 4, 2009 September 4, 2009
- Fixed: The aliasing of CPUInfo was still wrong. (Yarr! The things I do
for you, GCC!) The AMD feature flags weren't stored anywhere, either; not
that it really matters.
- Add an alternate PIC-compliant __cpuid macro in x86.cpp. - Add an alternate PIC-compliant __cpuid macro in x86.cpp.
- Fixed: S_LoadSound() did not byte-swap the frequency and length it reads - Fixed: S_LoadSound() did not byte-swap the frequency and length it reads
from DMX sounds. from DMX sounds.

View file

@ -96,9 +96,9 @@ haveid:
// Get vendor ID // Get vendor ID
__cpuid(foo, 0); __cpuid(foo, 0);
cpu->VendorID[0] = foo[1]; cpu->dwVendorID[0] = foo[1];
cpu->VendorID[1] = foo[3]; cpu->dwVendorID[1] = foo[3];
cpu->VendorID[2] = foo[2]; cpu->dwVendorID[2] = foo[2];
if (foo[1] == MAKE_ID('A','u','t','h') && if (foo[1] == MAKE_ID('A','u','t','h') &&
foo[3] == MAKE_ID('e','n','t','i') && foo[3] == MAKE_ID('e','n','t','i') &&
foo[2] == MAKE_ID('c','A','M','D')) foo[2] == MAKE_ID('c','A','M','D'))
@ -162,9 +162,9 @@ haveid:
cpu->AMDFamily += (foo[0] >> 20) & 0xFF; cpu->AMDFamily += (foo[0] >> 20) & 0xFF;
cpu->AMDModel |= (foo[0] >> 12) & 0xF0; cpu->AMDModel |= (foo[0] >> 12) & 0xF0;
} }
cpu->FeatureFlags[3] = foo[3]; // AMD feature flags
} }
} }
#endif #endif
} }

View file

@ -21,15 +21,15 @@ struct CPUInfo // 92 bytes
BYTE Family; BYTE Family;
BYTE Type; BYTE Type;
BYTE BrandIndex;
BYTE CLFlush;
BYTE CPUCount;
BYTE APICID;
union union
{ {
struct struct
{ {
BYTE BrandIndex;
BYTE CLFlush;
BYTE CPUCount;
BYTE APICID;
DWORD bSSE3:1; DWORD bSSE3:1;
DWORD DontCare1:8; DWORD DontCare1:8;
DWORD bSSSE3:1; DWORD bSSSE3:1;
@ -78,7 +78,7 @@ struct CPUInfo // 92 bytes
DWORD b3DNowPlus:1; DWORD b3DNowPlus:1;
DWORD b3DNow:1; DWORD b3DNow:1;
}; };
DWORD FeatureFlags[3]; DWORD FeatureFlags[4];
}; };
BYTE AMDStepping; BYTE AMDStepping;