| 65 | |
| 66 | #ifdef HAVE_CLMUL |
| 67 | static inline bool EnableClmul() |
| 68 | { |
| 69 | #ifdef _MSC_VER |
| 70 | int regs[4]; |
| 71 | __cpuid(regs, 1); |
| 72 | return (regs[2] & 0x2); |
| 73 | #else |
| 74 | uint32_t eax, ebx, ecx, edx; |
| 75 | return (__get_cpuid(1, &eax, &ebx, &ecx, &edx) && (ecx & 0x2)); |
| 76 | #endif |
| 77 | } |
| 78 | #endif |
| 79 | |
| 80 | Sketch* Construct(int bits, int impl) |