From: Michael Munday Date: Thu, 14 Apr 2016 17:29:37 +0000 (-0400) Subject: crypto/cipher: enable fastXORBytes on s390x X-Git-Tag: go1.7beta1~680 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=980146bfde2b4e2d62c537023c19670666fc0604;p=gostls13.git crypto/cipher: enable fastXORBytes on s390x 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 Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/crypto/cipher/xor.go b/src/crypto/cipher/xor.go index 020c9e1730..01ca0a9f08 100644 --- a/src/crypto/cipher/xor.go +++ b/src/crypto/cipher/xor.go @@ -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.