aboutsummaryrefslogtreecommitdiff
path: root/src/internal/cpu/cpu.go
diff options
context:
space:
mode:
authorbill_ofarrell <billo@ca.ibm.com>2018-10-30 22:45:51 -0400
committerMichael Munday <mike.munday@ibm.com>2018-12-05 10:58:44 +0000
commit897e0807c30a7b1860c15d4c05d68907fbba9262 (patch)
treea5165dd7071f1db0f28ebb4585fe39f968f41efe /src/internal/cpu/cpu.go
parent9be01c2eab928f9899c67eb7bcdb164728f85a2c (diff)
downloadgo-897e0807c30a7b1860c15d4c05d68907fbba9262.tar.xz
crypto/elliptic: utilize faster z14 multiply/square instructions (when available)
In the s390x assembly implementation of NIST P-256 curve, utilize faster multiply/square instructions introduced in the z14. These new instructions are designed for crypto and are constant time. The algorithm is unchanged except for faster multiplication when run on a z14 or later. On z13, the original mutiplication (also constant time) is used. P-256 performance is critical in many applications, such as Blockchain. name old time new time delta BaseMultP256 24396 ns/op 21564 ns/op 1.13x ScalarMultP256 87546 ns/op 72813 ns/op. 1.20x Change-Id: I7e6d8b420fac56d5f9cc13c9423e2080df854bac Reviewed-on: https://go-review.googlesource.com/c/146022 Reviewed-by: Michael Munday <mike.munday@ibm.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Michael Munday <mike.munday@ibm.com>
Diffstat (limited to 'src/internal/cpu/cpu.go')
-rw-r--r--src/internal/cpu/cpu.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/internal/cpu/cpu.go b/src/internal/cpu/cpu.go
index 5ac0989d79..eb74a9fa82 100644
--- a/src/internal/cpu/cpu.go
+++ b/src/internal/cpu/cpu.go
@@ -126,6 +126,7 @@ type s390x struct {
HasSHA256 bool // K{I,L}MD-SHA-256 functions
HasSHA512 bool // K{I,L}MD-SHA-512 functions
HasVX bool // vector facility. Note: the runtime sets this when it processes auxv records.
+ HasVE1 bool // vector-enhancement 1
_ CacheLinePad
}