mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: replace all uses of CtzXX with TrailingZerosXX
Replace all uses of Ctz64/32/8 with TrailingZeros64/32/8, because they are the same and maybe duplicated. Also renamed CtzXX functions in 386 assembly code. Change-Id: I19290204858083750f4be589bb0923393950ae6d Reviewed-on: https://go-review.googlesource.com/c/go/+/438935 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@google.com> Run-TryBot: Keith Randall <khr@golang.org>
This commit is contained in:
parent
c45ebef05e
commit
7ae652b7c0
12 changed files with 114 additions and 158 deletions
|
|
@ -617,7 +617,7 @@ func adjustpointers(scanp unsafe.Pointer, bv *bitvector, adjinfo *adjustinfo, f
|
|||
}
|
||||
b := *(addb(bv.bytedata, i/8))
|
||||
for b != 0 {
|
||||
j := uintptr(sys.Ctz8(b))
|
||||
j := uintptr(sys.TrailingZeros8(b))
|
||||
b &= b - 1
|
||||
pp := (*uintptr)(add(scanp, (i+j)*goarch.PtrSize))
|
||||
retry:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue