]> Cypherpunks repositories - gostls13.git/commit
runtime: copy some functions from math/bits to runtime/internal/sys
authorDavid Chase <drchase@google.com>
Fri, 8 Nov 2019 21:11:29 +0000 (16:11 -0500)
committerMichael Knyszek <mknyszek@google.com>
Fri, 8 Nov 2019 23:22:06 +0000 (23:22 +0000)
commit11da2b227a71c9c041320e22843047ad9b0ab1a8
tree4c19cff0feded160770e2896461e0bbb82c3d56f
parent42db1da8e9def3490ed904594ad80e1090bff654
runtime: copy some functions from math/bits to runtime/internal/sys

CL 201765 activated calls from the runtime to functions in math/bits.
When coverage and race detection were simultaneously enabled,
this caused a crash when the covered+race-checked code in
math/bits was called from the runtime before there was even a P.

PS Win for gdlv in helping sort this out.

TODO - next CL intrinsifies the new functions in
runtime/internal/sys

TODO/Would-be-nice - Ctz64 and TrailingZeros64 are the same
function; 386.s is intrinsified; clean all that up.

Fixes #35461.
Updates #35112.

Change-Id: I750a54dba493130ad3e68a06530ede7687d41e1d
Reviewed-on: https://go-review.googlesource.com/c/go/+/206199
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/go/build/deps_test.go
src/runtime/export_test.go
src/runtime/internal/sys/intrinsics.go
src/runtime/internal/sys/intrinsics_common.go [new file with mode: 0644]
src/runtime/mgcscavenge.go
src/runtime/mpagecache.go
src/runtime/mpallocbits.go