HasBMI checks whether an x86 CPU supports both BMI1 and BMI2 extensions.
()
| 27 | |
| 28 | // HasBMI checks whether an x86 CPU supports both BMI1 and BMI2 extensions. |
| 29 | func HasBMI() bool { |
| 30 | return HasBMI1() && HasBMI2() |
| 31 | } |
| 32 | |
| 33 | var hasBMI1 bool |
| 34 | var hasBMI2 bool |