You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
416 B

  1. // +build amd64,!noasm
  2. package p503
  3. import cpu "github.com/cloudflare/p751sidh/internal/utils"
  4. // There couple of reasons for having those variables here:
  5. // 1) to have an access to them from assembly
  6. // 2) to make it easy to vendor the library
  7. // 3) make it possible to test all functionalities
  8. var useMULX bool
  9. var useADXMULX bool
  10. func init() {
  11. useMULX = cpu.HasBMI2
  12. useADXMULX = cpu.HasADX && cpu.HasBMI2
  13. }