| 374 | #endif |
| 375 | |
| 376 | static int |
| 377 | npy__cpu_getxcr0(void) |
| 378 | { |
| 379 | #if defined(_MSC_VER) || defined (__INTEL_COMPILER) |
| 380 | return _xgetbv(0); |
| 381 | #elif defined(__GNUC__) || defined(__clang__) |
| 382 | /* named form of xgetbv not supported on OSX, so must use byte form, see: |
| 383 | * https://github.com/asmjit/asmjit/issues/78 |
| 384 | */ |
| 385 | unsigned int eax, edx; |
| 386 | __asm(".byte 0x0F, 0x01, 0xd0" : "=a"(eax), "=d"(edx) : "c"(0)); |
| 387 | return eax; |
| 388 | #else |
| 389 | return 0; |
| 390 | #endif |
| 391 | } |
| 392 | |
| 393 | static void |
| 394 | npy__cpu_cpuid(int reg[4], int func_id) |
no outgoing calls
no test coverage detected