mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-19 07:22:14 +08:00
* fhandler_proc.cc (format_proc_cpuinfo): Remove Intel-specific flags
from /proc/cpuinfo on non-Intel processors. Added new AMD-specific flags. Changed Intel flag names to match Linux.
This commit is contained in:
parent
3bf0227220
commit
2646298531
@ -1,3 +1,9 @@
|
||||
2004-07-26 Christopher January <chris@atomice.net>
|
||||
|
||||
* fhandler_proc.cc (format_proc_cpuinfo): Remove Intel-specific flags
|
||||
from /proc/cpuinfo on non-Intel processors. Added new AMD-specific
|
||||
flags. Changed Intel flag names to match Linux.
|
||||
|
||||
2004-07-24 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* dcrt0.cc (dll_crt0_0): Use proper boolean arguments.
|
||||
|
@ -841,9 +841,9 @@ format_proc_cpuinfo (char *destbuf, size_t maxsize)
|
||||
print (" psn");
|
||||
if (features1 & (1 << 19))
|
||||
print (" clfl");
|
||||
if (features1 & (1 << 21))
|
||||
if (is_intel && features1 & (1 << 21))
|
||||
print (" dtes");
|
||||
if (features1 & (1 << 22))
|
||||
if (is_intel && features1 & (1 << 22))
|
||||
print (" acpi");
|
||||
if (features1 & (1 << 23))
|
||||
print (" mmx");
|
||||
@ -851,6 +851,8 @@ format_proc_cpuinfo (char *destbuf, size_t maxsize)
|
||||
print (" fxsr");
|
||||
if (features1 & (1 << 25))
|
||||
print (" sse");
|
||||
if (is_intel)
|
||||
{
|
||||
if (features1 & (1 << 26))
|
||||
print (" sse2");
|
||||
if (features1 & (1 << 27))
|
||||
@ -863,33 +865,42 @@ format_proc_cpuinfo (char *destbuf, size_t maxsize)
|
||||
print (" ia-64");
|
||||
if (features1 & (1 << 31))
|
||||
print (" pbe");
|
||||
|
||||
if (features2 & (1 << 0))
|
||||
print (" sse3");
|
||||
print (" pni");
|
||||
if (features2 & (1 << 3))
|
||||
print (" mon");
|
||||
print (" monitor");
|
||||
if (features2 & (1 << 4))
|
||||
print (" dscpl");
|
||||
if (features2 & (1 << 8))
|
||||
print (" ds_cpl");
|
||||
if (features2 & (1 << 7))
|
||||
print (" tm2");
|
||||
if (features2 & (1 << 8))
|
||||
print (" est");
|
||||
if (features2 & (1 << 10))
|
||||
print (" cid");
|
||||
}
|
||||
|
||||
if (is_amd)
|
||||
if (is_amd && maxe >= 0x80000001)
|
||||
{
|
||||
// uses AMD extended calls to check
|
||||
// for 3dnow and 3dnow extended support
|
||||
// (source: AMD Athlon Processor Recognition Application Note)
|
||||
unsigned int a = 0, b, c, d;
|
||||
cpuid (&a, &b, &c, &d, 0x80000000);
|
||||
|
||||
if (a >= 0x80000001) // has basic capabilities
|
||||
if (maxe >= 0x80000001) // has basic capabilities
|
||||
{
|
||||
cpuid (&a, &b, &c, &d, 0x80000001);
|
||||
cpuid (&unused, &unused, &unused, &features2, 0x80000001);
|
||||
|
||||
if(d & (1 << 30)) // 31th bit is on
|
||||
if (features2 & (1 << 11))
|
||||
print (" syscall");
|
||||
if (features2 & (1 << 19))
|
||||
print (" mp");
|
||||
if (features2 & (1 << 22))
|
||||
print (" mmxext");
|
||||
if (features2 & (1 << 29))
|
||||
print (" lm");
|
||||
if (features2 & (1 << 30)) // 31th bit is on
|
||||
print (" 3dnowext");
|
||||
|
||||
if(d & (1 << 31)) // 32th bit (highest) is on
|
||||
if (features2 & (1 << 31)) // 32th bit (highest) is on
|
||||
print (" 3dnow");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user