]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix unaligned loads/stores to global variables on s390x
authorMichael Munday <mike.munday@ibm.com>
Mon, 17 Jul 2017 11:07:28 +0000 (07:07 -0400)
committerMichael Munday <mike.munday@ibm.com>
Wed, 19 Jul 2017 14:22:48 +0000 (14:22 +0000)
commit93b7eb973f4f6812a6b9c093b4b6d5c80409eb92
treec70faca76d2f09cc094d5e2ba7d11814075189dd
parent83fb9c8d9f5511f5aca2a0eb9f7507e2527a76a9
cmd/compile: fix unaligned loads/stores to global variables on s390x

Load/store-merging and move optimizations can result in unaligned
memory accesses. This is fine so long as the load/store instruction
used does not take a relative offset. In the SSA rules this means we
must not merge (MOVDaddr (SB)) ops into loads/stores unless we can
guarantee the alignment of the target.

Fixes #21048.

Change-Id: I70f13a62a148d5f0a56e704e8f76e36b4a4226d9
Reviewed-on: https://go-review.googlesource.com/49250
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/ssa/gen/S390X.rules
src/cmd/compile/internal/ssa/rewriteS390X.go
test/fixedbugs/issue21048.go [new file with mode: 0644]