]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/cipher: enable fastXORBytes on s390x
authorMichael Munday <munday@ca.ibm.com>
Thu, 14 Apr 2016 17:29:37 +0000 (13:29 -0400)
committerMichael Munday <munday@ca.ibm.com>
Thu, 14 Apr 2016 18:26:09 +0000 (18:26 +0000)
s390x can handle unaligned loads and stores of 64-bit values.

Change-Id: Iae5621781e3ba56e27b4a1f4788772c86e4f6475
Reviewed-on: https://go-review.googlesource.com/22086
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/crypto/cipher/xor.go

index 020c9e1730e9bb8cc5767d3eafafa8143c8b76eb..01ca0a9f086f8bf8bda27460b088c2c23a7d43bf 100644 (file)
@@ -10,7 +10,7 @@ import (
 )
 
 const wordSize = int(unsafe.Sizeof(uintptr(0)))
-const supportsUnaligned = runtime.GOARCH == "386" || runtime.GOARCH == "amd64" || runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le"
+const supportsUnaligned = runtime.GOARCH == "386" || runtime.GOARCH == "amd64" || runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le" || runtime.GOARCH == "s390x"
 
 // fastXORBytes xors in bulk. It only works on architectures that
 // support unaligned read/writes.