summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2014-10-31 13:39:36 -0400
committerAustin Clements <austin@google.com>2014-10-31 13:39:36 -0400
commit515641a7d9e906e27c64aeb674609b55b4b43b8b (patch)
treecccd1568501e3c91a926bf0348da455c2f7e3155 /src/reflect
parentbfab3e583ce8e78b9488fdb292f3f371949757a6 (diff)
downloadgo-515641a7d9e906e27c64aeb674609b55b4b43b8b.tar.gz
[dev.power64] runtime: fix fastrand1 on power64x
fastrand1 depends on testing the high bit of its uint32 state. For efficiency, all of the architectures implement this as a sign bit test. However, on power64, fastrand1 was using a 64-bit sign test on the zero-extended 32-bit state. This always failed, causing fastrand1 to have very short periods and often decay to 0 and get stuck. Fix this by using a 32-bit signed compare instead of a 64-bit compare. This fixes various tests for the randomization of select of map iteration. LGTM=rsc R=rsc, dave CC=golang-codereviews https://codereview.appspot.com/166990043
Diffstat (limited to 'src/reflect')
0 files changed, 0 insertions, 0 deletions