Lines 892-898
static inline void cpuid(unsigned int op
Link Here
|
892 |
#ifdef __LCLINT__ |
892 |
#ifdef __LCLINT__ |
893 |
*eax = *ebx = *ecx = *edx = 0; |
893 |
*eax = *ebx = *ecx = *edx = 0; |
894 |
#endif |
894 |
#endif |
895 |
#ifdef PIC |
895 |
#ifdef __PIC__ |
896 |
__asm__("pushl %%ebx; cpuid; movl %%ebx,%1; popl %%ebx" |
896 |
__asm__("pushl %%ebx; cpuid; movl %%ebx,%1; popl %%ebx" |
897 |
: "=a"(*eax), "=g"(*ebx), "=&c"(*ecx), "=&d"(*edx) |
897 |
: "=a"(*eax), "=g"(*ebx), "=&c"(*ecx), "=&d"(*edx) |
898 |
: "a" (op)); |
898 |
: "a" (op)); |
Lines 912-918
static inline unsigned int cpuid_eax(uns
Link Here
|
912 |
{ |
912 |
{ |
913 |
unsigned int val; |
913 |
unsigned int val; |
914 |
|
914 |
|
915 |
#ifdef PIC |
915 |
#ifdef __PIC__ |
916 |
__asm__("pushl %%ebx; cpuid; popl %%ebx" |
916 |
__asm__("pushl %%ebx; cpuid; popl %%ebx" |
917 |
: "=a" (val) : "a" (op) : "ecx", "edx"); |
917 |
: "=a" (val) : "a" (op) : "ecx", "edx"); |
918 |
#else |
918 |
#else |
Lines 927-933
static inline unsigned int cpuid_ebx(uns
Link Here
|
927 |
{ |
927 |
{ |
928 |
unsigned int tmp, val; |
928 |
unsigned int tmp, val; |
929 |
|
929 |
|
930 |
#ifdef PIC |
930 |
#ifdef __PIC__ |
931 |
__asm__("pushl %%ebx; cpuid; movl %%ebx,%1; popl %%ebx" |
931 |
__asm__("pushl %%ebx; cpuid; movl %%ebx,%1; popl %%ebx" |
932 |
: "=a" (tmp), "=g" (val) : "a" (op) : "ecx", "edx"); |
932 |
: "=a" (tmp), "=g" (val) : "a" (op) : "ecx", "edx"); |
933 |
#else |
933 |
#else |
Lines 941-947
static inline unsigned int cpuid_ecx(uns
Link Here
|
941 |
/*@*/ |
941 |
/*@*/ |
942 |
{ |
942 |
{ |
943 |
unsigned int tmp, val; |
943 |
unsigned int tmp, val; |
944 |
#ifdef PIC |
944 |
#ifdef __PIC__ |
945 |
__asm__("pushl %%ebx; cpuid; popl %%ebx" |
945 |
__asm__("pushl %%ebx; cpuid; popl %%ebx" |
946 |
: "=a" (tmp), "=c" (val) : "a" (op) : "edx"); |
946 |
: "=a" (tmp), "=c" (val) : "a" (op) : "edx"); |
947 |
#else |
947 |
#else |
Lines 956-962
static inline unsigned int cpuid_edx(uns
Link Here
|
956 |
/*@*/ |
956 |
/*@*/ |
957 |
{ |
957 |
{ |
958 |
unsigned int tmp, val; |
958 |
unsigned int tmp, val; |
959 |
#ifdef PIC |
959 |
#ifdef __PIC__ |
960 |
__asm__("pushl %%ebx; cpuid; popl %%ebx" |
960 |
__asm__("pushl %%ebx; cpuid; popl %%ebx" |
961 |
: "=a" (tmp), "=d" (val) : "a" (op) : "ecx"); |
961 |
: "=a" (tmp), "=d" (val) : "a" (op) : "ecx"); |
962 |
#else |
962 |
#else |