| 36 | int fd_msr; |
| 37 | |
| 38 | unsigned int cpuid(unsigned int op) |
| 39 | { |
| 40 | uint32_t ret; |
| 41 | |
| 42 | #if defined(__PIC__) || defined(__DARWIN__) && !defined(__LP64__) |
| 43 | asm volatile ( |
| 44 | "push " BREG "\n\t" |
| 45 | "cpuid\n\t" |
| 46 | "pop " BREG "\n\t" |
| 47 | : "=a" (ret) : "a" (op) : "%ecx", "%edx" |
| 48 | ); |
| 49 | #else |
| 50 | asm ("cpuid" : "=a" (ret) : "a" (op) : "%ebx", "%ecx", "%edx"); |
| 51 | #endif |
| 52 | |
| 53 | return ret; |
| 54 | } |
| 55 | |
| 56 | inline cpuid_result_t cpuid_ext(int op, unsigned int ecx) |
| 57 | { |
no outgoing calls
no test coverage detected