mirror of https://github.com/golang/go.git
crypto/internal/fips: fix Avo generators
They needed their package names updated after packages were moved to crypto/internal/fips. Also, mitigated mmcloughlin/avo#450 which would require setting GOARCH=amd64 at generation time. Change-Id: Ib903ef113ebb5a24844204f231f2507cea03a67e Reviewed-on: https://go-review.googlesource.com/c/go/+/626075 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Russ Cox <rsc@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
840ac5e037
commit
2c7b5ba8ca
|
|
@ -5,12 +5,14 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
. "github.com/mmcloughlin/avo/build"
|
. "github.com/mmcloughlin/avo/build"
|
||||||
. "github.com/mmcloughlin/avo/operand"
|
. "github.com/mmcloughlin/avo/operand"
|
||||||
. "github.com/mmcloughlin/avo/reg"
|
. "github.com/mmcloughlin/avo/reg"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate go run . -out ../sha256block_amd64.s -pkg sha256
|
//go:generate go run . -out ../sha256block_amd64.s
|
||||||
|
|
||||||
// SHA256 block routine. See sha256block.go for Go equivalent.
|
// SHA256 block routine. See sha256block.go for Go equivalent.
|
||||||
//
|
//
|
||||||
|
|
@ -53,7 +55,11 @@ import (
|
||||||
// H7 = h + H7
|
// H7 = h + H7
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
Package("crypto/sha256")
|
// https://github.com/mmcloughlin/avo/issues/450
|
||||||
|
os.Setenv("GOOS", "linux")
|
||||||
|
os.Setenv("GOARCH", "amd64")
|
||||||
|
|
||||||
|
Package("crypto/internal/fips/sha256")
|
||||||
ConstraintExpr("!purego")
|
ConstraintExpr("!purego")
|
||||||
blockAMD64()
|
blockAMD64()
|
||||||
blockAVX2()
|
blockAVX2()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Code generated by command: go run sha256block_amd64_asm.go -out ../sha256block_amd64.s -pkg sha256. DO NOT EDIT.
|
// Code generated by command: go run sha256block_amd64_asm.go -out ../sha256block_amd64.s. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build !purego
|
//go:build !purego
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,15 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
. "github.com/mmcloughlin/avo/build"
|
. "github.com/mmcloughlin/avo/build"
|
||||||
. "github.com/mmcloughlin/avo/operand"
|
. "github.com/mmcloughlin/avo/operand"
|
||||||
. "github.com/mmcloughlin/avo/reg"
|
. "github.com/mmcloughlin/avo/reg"
|
||||||
_ "golang.org/x/crypto/sha3"
|
_ "golang.org/x/crypto/sha3"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate go run . -out ../keccakf_amd64.s -pkg sha3
|
//go:generate go run . -out ../sha3_amd64.s
|
||||||
|
|
||||||
// Round Constants for use in the ι step.
|
// Round Constants for use in the ι step.
|
||||||
var RoundConstants = [24]uint64{
|
var RoundConstants = [24]uint64{
|
||||||
|
|
@ -100,7 +102,11 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
Package("golang.org/x/crypto/sha3")
|
// https://github.com/mmcloughlin/avo/issues/450
|
||||||
|
os.Setenv("GOOS", "linux")
|
||||||
|
os.Setenv("GOARCH", "amd64")
|
||||||
|
|
||||||
|
Package("crypto/internal/fips/sha3")
|
||||||
ConstraintExpr("!purego")
|
ConstraintExpr("!purego")
|
||||||
keccakF1600()
|
keccakF1600()
|
||||||
Generate()
|
Generate()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Code generated by command: go run keccakf_amd64_asm.go -out ../keccakf_amd64.s -pkg sha3. DO NOT EDIT.
|
// Code generated by command: go run keccakf_amd64_asm.go -out ../sha3_amd64.s. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build !purego
|
//go:build !purego
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,14 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
. "github.com/mmcloughlin/avo/build"
|
. "github.com/mmcloughlin/avo/build"
|
||||||
. "github.com/mmcloughlin/avo/operand"
|
. "github.com/mmcloughlin/avo/operand"
|
||||||
. "github.com/mmcloughlin/avo/reg"
|
. "github.com/mmcloughlin/avo/reg"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate go run . -out ../sha512block_amd64.s -pkg sha512
|
//go:generate go run . -out ../sha512block_amd64.s
|
||||||
|
|
||||||
// SHA512 block routine. See sha512block.go for Go equivalent.
|
// SHA512 block routine. See sha512block.go for Go equivalent.
|
||||||
//
|
//
|
||||||
|
|
@ -138,7 +140,11 @@ var _K = []uint64{
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
Package("crypto/sha512")
|
// https://github.com/mmcloughlin/avo/issues/450
|
||||||
|
os.Setenv("GOOS", "linux")
|
||||||
|
os.Setenv("GOARCH", "amd64")
|
||||||
|
|
||||||
|
Package("crypto/internal/fips/sha512")
|
||||||
ConstraintExpr("!purego")
|
ConstraintExpr("!purego")
|
||||||
blockAMD64()
|
blockAMD64()
|
||||||
blockAVX2()
|
blockAVX2()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Code generated by command: go run sha512block_amd64_asm.go -out ../sha512block_amd64.s -pkg sha512. DO NOT EDIT.
|
// Code generated by command: go run sha512block_amd64_asm.go -out ../sha512block_amd64.s. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build !purego
|
//go:build !purego
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue