aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/crypto/elliptic
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2019-01-18 19:04:36 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-01-18 19:04:36 +0000
commit4f4a855d82a889cebcfca150a7a43909bcb6a346 (patch)
treef12bae0781920fa34669fe30b6f4615a86d9fb80 /libgo/go/crypto/elliptic
parent225220d668dafb8262db7012bced688acbe63b33 (diff)
downloadgcc-4f4a855d82a889cebcfca150a7a43909bcb6a346.zip
gcc-4f4a855d82a889cebcfca150a7a43909bcb6a346.tar.gz
gcc-4f4a855d82a889cebcfca150a7a43909bcb6a346.tar.bz2
libgo: update to Go1.12beta2
Reviewed-on: https://go-review.googlesource.com/c/158019 gotools/: * Makefile.am (go_cmd_vet_files): Update for Go1.12beta2 release. (GOTOOLS_TEST_TIMEOUT): Increase to 600. (check-runtime): Export LD_LIBRARY_PATH before computing GOARCH and GOOS. (check-vet): Copy golang.org/x/tools into check-vet-dir. * Makefile.in: Regenerate. gcc/testsuite/: * go.go-torture/execute/names-1.go: Stop using debug/xcoff, which is no longer externally visible. From-SVN: r268084
Diffstat (limited to 'libgo/go/crypto/elliptic')
-rw-r--r--libgo/go/crypto/elliptic/p256_s390x.go34
1 files changed, 28 insertions, 6 deletions
diff --git a/libgo/go/crypto/elliptic/p256_s390x.go b/libgo/go/crypto/elliptic/p256_s390x.go
index 43e19e9..40c0929 100644
--- a/libgo/go/crypto/elliptic/p256_s390x.go
+++ b/libgo/go/crypto/elliptic/p256_s390x.go
@@ -9,7 +9,14 @@ package elliptic
import (
"crypto/subtle"
+ "internal/cpu"
"math/big"
+ "unsafe"
+)
+
+const (
+ offsetS390xHasVX = unsafe.Offsetof(cpu.S390X.HasVX)
+ offsetS390xHasVE1 = unsafe.Offsetof(cpu.S390X.HasVE1)
)
type p256CurveFast struct {
@@ -27,14 +34,26 @@ var (
p256PreFast *[37][64]p256Point
)
-// hasVectorFacility reports whether the machine has the z/Architecture
-// vector facility installed and enabled.
-func hasVectorFacility() bool
+//go:noescape
+func p256MulInternalTrampolineSetup()
+
+//go:noescape
+func p256SqrInternalTrampolineSetup()
+
+//go:noescape
+func p256MulInternalVX()
+
+//go:noescape
+func p256MulInternalVMSL()
-var hasVX = hasVectorFacility()
+//go:noescape
+func p256SqrInternalVX()
+
+//go:noescape
+func p256SqrInternalVMSL()
func initP256Arch() {
- if hasVX {
+ if cpu.S390X.HasVX {
p256 = p256CurveFast{p256Params}
initTable()
return
@@ -53,11 +72,14 @@ func (curve p256CurveFast) Params() *CurveParams {
// Montgomery multiplication modulo P256
//
//go:noescape
+func p256SqrAsm(res, in1 []byte)
+
+//go:noescape
func p256MulAsm(res, in1, in2 []byte)
// Montgomery square modulo P256
func p256Sqr(res, in []byte) {
- p256MulAsm(res, in, in)
+ p256SqrAsm(res, in)
}
// Montgomery multiplication by 1