diff options
| author | Youlin Feng <fengyoulin@live.com> | 2022-10-05 15:29:29 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-10-18 18:06:27 +0000 |
| commit | 7ae652b7c0cddb8f6e04bfa6f5805baac823dd64 (patch) | |
| tree | 04b02db5fd0e54ac405a67b3ef6b297bffd0fbfb /src/runtime/stack.go | |
| parent | c45ebef05edcb217be8f9bf1d7649763132727cc (diff) | |
| download | go-7ae652b7c0cddb8f6e04bfa6f5805baac823dd64.tar.xz | |
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>
Diffstat (limited to 'src/runtime/stack.go')
| -rw-r--r-- | src/runtime/stack.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/stack.go b/src/runtime/stack.go index 10c45045d9..87d8e519bd 100644 --- a/src/runtime/stack.go +++ b/src/runtime/stack.go @@ -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: |
