diff options
| author | Keith Randall <khr@golang.org> | 2017-03-14 13:25:12 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2017-03-16 02:44:16 +0000 |
| commit | d5dc4905191c3f7cfeb52e93331d10ebd33301f5 (patch) | |
| tree | efbe9f8a06b01b0510d8a09fa4edcc4f2c6fb133 /src/runtime/malloc.go | |
| parent | 16200c73331a679b43efc4699b5806c64a556f09 (diff) | |
| download | go-d5dc4905191c3f7cfeb52e93331d10ebd33301f5.tar.xz | |
cmd/compile: intrinsics for math/bits.TrailingZerosX
Implement math/bits.TrailingZerosX using intrinsics.
Generally reorganize the intrinsic spec a bit.
The instrinsics data structure is now built at init time.
This will make doing the other functions in math/bits easier.
Update sys.CtzX to return int instead of uint{64,32} so it
matches math/bits.TrailingZerosX.
Improve the intrinsics a bit for amd64. We don't need the CMOV
for <64 bit versions.
Update #18616
Change-Id: Ic1c5339c943f961d830ae56f12674d7b29d4ff39
Reviewed-on: https://go-review.googlesource.com/38155
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/runtime/malloc.go')
| -rw-r--r-- | src/runtime/malloc.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index 25ae261bb2..344771c899 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -491,7 +491,7 @@ func nextFreeFast(s *mspan) gclinkptr { if freeidx%64 == 0 && freeidx != s.nelems { return 0 } - s.allocCache >>= (theBit + 1) + s.allocCache >>= uint(theBit + 1) s.freeindex = freeidx v := gclinkptr(result*s.elemsize + s.base()) s.allocCount++ |
