github.com/consensys/gnark-crypto@v0.14.0/field/generator/internal/templates/element/asm.go (about)

     1  package element
     2  
     3  // Asm ...
     4  const Asm = `
     5  import 	"golang.org/x/sys/cpu"
     6  
     7  var (
     8  	supportAdx = cpu.X86.HasADX && cpu.X86.HasBMI2
     9  	_ = supportAdx
    10  )
    11  `
    12  
    13  // AsmNoAdx ...
    14  const AsmNoAdx = `
    15  
    16  // note: this is needed for test purposes, as dynamically changing supportAdx doesn't flag
    17  // certain errors (like fatal error: missing stackmap)
    18  // this ensures we test all asm path.
    19  var (
    20  	supportAdx = false
    21  	_ = supportAdx
    22  )
    23  `