If you have a system with AMD Opteron processor(s), then try running the following program on it:
#include <stdio.h>
inline void cpuid(unsigned int op, unsigned int *eax, unsigned int
*ebx, unsigned int *ecx, unsigned int *edx)
{
__asm__("cpuid"
: "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
: "a" (op)
: "cc");
}
int main(void)
{
unsigned int eax,ebx,ecx,edx;
unsigned int i=0;
char array[17];
char *cp=array;
cpuid(0x8fffffff, &eax,&ebx,&ecx,&edx);
for (i = 0; i < 4; i++)
*cp++ = eax >> (8 * i);
for (i = 0; i < 4; i++)
*cp++ = ebx >> (8 * i);
for (i = 0; i < 4; i++)
*cp++ = ecx >> (8 * i);
for (i = 0; i < 4; i++)
*cp++ = edx >> (8 * i);
*cp = 0;
printf ("%s\n", array);
}
It can be easily compiled on Solaris with gcc:
$ /usr/sfw/bin/gcc -o opteron opteron.c