Diff for libplaton/platon/cpu/x86cpuid.c between version 1.2 and 1.3
| version 1.2, 2002/05/06 17:39:59 |
version 1.3, 2002/09/19 23:18:00 |
|
|
| #include <string.h> |
#include <string.h> |
| #endif |
#endif |
| |
|
| /* #include <signal.h> |
char *x86cpuid(void) |
| void nope() { exit(1); } */ |
|
| |
|
| char *get_x86cpuid(void) |
|
| { |
{ |
| unsigned long x[4]; |
unsigned long x[4]; |
| unsigned long y[4]; |
unsigned long y[4]; |
| register char *str; |
register char *str; |
| |
|
| /* signal(SIGILL, nope); */ |
|
| |
|
| x[0] = x[1] = x[2] = x[3] = 0; |
x[0] = x[1] = x[2] = x[3] = 0; |
| |
|
| __asm__ volatile(".byte 15;.byte 162" |
__asm__ volatile(".byte 15;.byte 162" |
|
|
| { |
{ |
| register char *cpuid; |
register char *cpuid; |
| |
|
| if ((cpuid = get_x86cpuid()) == NULL) { |
if ((cpuid = x86cpuid()) == NULL) { |
| puts("memory allocation error"); |
puts("memory allocation error"); |
| return 1; |
return 1; |
| } |
} |
Platon Group <platon@platon.org> http://platon.org/
|
|