]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix large load/store offsets on 386
authorKeith Randall <khr@google.com>
Thu, 7 Dec 2017 22:11:19 +0000 (14:11 -0800)
committerKeith Randall <khr@golang.org>
Fri, 8 Dec 2017 03:53:18 +0000 (03:53 +0000)
commit4c800f03c9f988d5de0481de0d77d103213b295c
tree3371172ca1bc8a2b73b07e8c3f3a763e91a804cd
parentfdf3ceafc61c0cf9b7b7bd6757f0c51393a7a83c
cmd/compile: fix large load/store offsets on 386

Pointer arithemetic is done mod 2^32 on 386, so we can just
drop the high bits of any large constant offsets.

The bounds check will make sure wraparounds are never observed.

Fixes #21655

Change-Id: I68ae5bbea9f02c73968ea2b21ca017e5ecb89223
Reviewed-on: https://go-review.googlesource.com/82675
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/gen/386.rules
src/cmd/compile/internal/ssa/rewrite386.go
test/fixedbugs/issue21655.go