1
0
mirror of https://github.com/golang/go synced 2024-11-14 23:30:27 -07:00
go/src/cmd/compile
David Chase 9d5987d79f cmd/compile: rewrite upper-bit-clear idiom to use shift-rotate
Old buggy hardware incorrectly executes the shift-left-K
then shift-right-K idiom for clearing K leftmost bits.
Use a right rotate instead of shift to avoid triggering the
bug.

Fixes #19809.

Change-Id: I6dc646b183c29e9d01aef944729f34388dcc687d
Reviewed-on: https://go-review.googlesource.com/39310
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2017-04-03 17:16:23 +00:00
..
internal cmd/compile: rewrite upper-bit-clear idiom to use shift-rotate 2017-04-03 17:16:23 +00:00
doc.go cmd/compile: add block profiling support 2017-04-03 01:48:59 +00:00
fmt_test.go cmd/compile: remove makefuncdatasym_nsym global 2017-03-31 19:53:26 +00:00
main.go cmd/compile: eliminate direct uses of gc.Thearch in backends 2017-03-17 22:10:53 +00:00