]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix 4-byte unaligned load rules
authorKeith Randall <khr@golang.org>
Mon, 19 Sep 2016 21:35:41 +0000 (14:35 -0700)
committerKeith Randall <khr@golang.org>
Fri, 23 Sep 2016 19:32:37 +0000 (19:32 +0000)
commit26a6131bacb5dbc491f77329557580df0a310858
treea237ac520980712fa47ededdb10380152433ae6f
parent120e9ff34f577376f8d1c25a8966c88e0e92fee5
cmd/compile: fix 4-byte unaligned load rules

The 2-byte rule was firing before the 4-byte rule, preventing
the 4-byte rule from firing.  Update the 4-byte rule to use
the results of the 2-byte rule instead.

Add some tests to make sure we don't regress again.

Fixes #17147

Change-Id: Icfeccd9f2b96450981086a52edd76afb3191410a
Reviewed-on: https://go-review.googlesource.com/29382
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/gc/asm_test.go
src/cmd/compile/internal/ssa/gen/386.rules
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/rewrite386.go
src/cmd/compile/internal/ssa/rewriteAMD64.go