| 54 | } |
| 55 | |
| 56 | inline cpuid_result_t cpuid_ext(int op, unsigned int ecx) |
| 57 | { |
| 58 | cpuid_result_t result; |
| 59 | |
| 60 | #ifndef __DARWIN__ |
| 61 | asm volatile ( |
| 62 | "mov %%ebx, %%edi;" |
| 63 | "cpuid;" |
| 64 | "mov %%ebx, %%esi;" |
| 65 | "mov %%edi, %%ebx;" |
| 66 | : "=a" (result.eax), |
| 67 | "=S" (result.ebx), |
| 68 | "=c" (result.ecx), |
| 69 | "=d" (result.edx) |
| 70 | : "0" (op), "2" (ecx) |
| 71 | : "edi"); |
| 72 | #endif |
| 73 | return result; |
| 74 | } |
| 75 | |
| 76 | #ifndef __DARWIN__ |
| 77 | int msr_readerror = 0; |
no outgoing calls
no test coverage detected