|
|
"\n\txor %%esi, %%esi" // clear %%esi = result register | "\n\txor %%esi, %%esi" // clear %%esi = result register |
// check if 'cpuid' instructions is available by toggling eflags bit 21 | // check if 'cpuid' instructions is available by toggling eflags bit 21 |
| |
|
"\n\tpushl %%ebx" |
"\n\tpushf" // save eflags to stack | "\n\tpushf" // save eflags to stack |
"\n\tpop %%eax" // load eax from stack (with eflags) | "\n\tpop %%eax" // load eax from stack (with eflags) |
"\n\tmovl %%eax, %%ecx" // save the original eflags values to ecx | "\n\tmovl %%eax, %%ecx" // save the original eflags values to ecx |
|
|
| |
"\n\tend:" | "\n\tend:" |
| |
|
"\n\tpopl %%ebx" |
"\n\tmov %%esi, %0" | "\n\tmov %%esi, %0" |
| |
: "=rm" (res) | : "=rm" (res) |
: /* no inputs */ | : /* no inputs */ |
: "%edx", "%eax", "%ecx", "%ebx", "%esi" ); |
: "%edx", "%eax", "%ecx", "%esi" ); |
| |
return res & ~_dwDisabledISA; | return res & ~_dwDisabledISA; |
#endif | #endif |