]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix register size for ODOTPTR result
authorKeith Randall <khr@golang.org>
Thu, 14 Apr 2016 20:47:58 +0000 (13:47 -0700)
committerKeith Randall <khr@golang.org>
Thu, 14 Apr 2016 21:19:12 +0000 (21:19 +0000)
commitac8127d7e6ead390bc44c89d47d16be587c3ac11
tree83cffc27c45273b7a0d7bbdd2335a693b058f17d
parent7c7081f514c9ec4820a842f7ef07394df4d41bab
cmd/compile: fix register size for ODOTPTR result

The result of ODOTPTR, as well as a bunch of other ops,
should be the type of the result, not always a pointer type.

This fixes an amd64p32 bug where we were incorrectly truncating
a 64-bit slice index to 32 bits, and then barfing on a weird
load-64-bits-but-then-truncate-to-32-bits op that doesn't exist.

Fixes #15252

Change-Id: Ie62f4315fffd79f233e5449324ccc0879f5ac343
Reviewed-on: https://go-review.googlesource.com/22094
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/cgen.go
test/fixedbugs/issue15252.go [new file with mode: 0644]