]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: truncate auxint when constructing Prog
authorTodd Neal <todd@tneal.org>
Fri, 19 Feb 2016 22:58:21 +0000 (16:58 -0600)
committerTodd Neal <todd@tneal.org>
Tue, 23 Feb 2016 03:52:08 +0000 (03:52 +0000)
commitc17b6b488cbf448da374d576be0f921e655b00b1
tree4448d24e32c0f9d32ae6ffcd36b256115e8c088b
parent9dc1334cc76eda231bd776e78d678649e630563b
[dev.ssa] cmd/compile: truncate auxint when constructing Prog

The upper bits of 8/16/32 bit constants are undefined.  We need to
truncate in order to prevent x86.oclass misidentifying the size of the
constant.

Fixes #14389

Change-Id: I3e5ff79cd904376572a93f489ba7e152a5cb6e60
Reviewed-on: https://go-review.googlesource.com/19740
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/testdata/arith_ssa.go
src/cmd/compile/internal/ssa/value.go