| 45 | } |
| 46 | |
| 47 | static inline cpuid_result_t cpuid_ext(uint32_t eax, unsigned int ecx) |
| 48 | { |
| 49 | cpuid_result_t result; |
| 50 | |
| 51 | #ifndef __DARWIN__ |
| 52 | asm volatile ( |
| 53 | "mov %%ebx, %%edi;" |
| 54 | "cpuid;" |
| 55 | "mov %%ebx, %%esi;" |
| 56 | "mov %%edi, %%ebx;" |
| 57 | : "=a" (result.eax), |
| 58 | "=S" (result.ebx), |
| 59 | "=c" (result.ecx), |
| 60 | "=d" (result.edx) |
| 61 | : "0" (eax), "2" (ecx) |
| 62 | : "edi"); |
| 63 | #endif |
| 64 | return result; |
| 65 | } |
| 66 | |
| 67 | #ifndef __DARWIN__ |
| 68 | int msr_readerror = 0; |
no outgoing calls
no test coverage detected