]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use unsigned loads for multi-element comparisons
authorKeith Randall <khr@google.com>
Tue, 6 Feb 2018 17:44:34 +0000 (09:44 -0800)
committerKeith Randall <khr@golang.org>
Tue, 6 Feb 2018 18:24:33 +0000 (18:24 +0000)
commit23e8e197b0cd40312d96dd7576a44796f65dfb50
treec997230379b7dfdf2cab9f3fcc5c676b111f091f
parent85bdd05c0542e9274b1b5ffc3b329a7865fda5e2
cmd/compile: use unsigned loads for multi-element comparisons

When loading multiple elements of an array into a single register,
make sure we treat them as unsigned.  When treated as signed, the
upper bits might all be set, causing the shift-or combo to clobber
the values higher in the register.

Fixes #23719.

Change-Id: Ic87da03e9bd0fe2c60bb214b99f846e4e9446052
Reviewed-on: https://go-review.googlesource.com/92335
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
src/cmd/compile/internal/gc/asm_test.go
src/cmd/compile/internal/gc/walk.go
test/fixedbugs/issue23719.go [new file with mode: 0644]