From 7ae652b7c0cddb8f6e04bfa6f5805baac823dd64 Mon Sep 17 00:00:00 2001 From: Youlin Feng Date: Wed, 5 Oct 2022 15:29:29 +0800 Subject: 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 Reviewed-by: Bryan Mills Auto-Submit: Keith Randall TryBot-Result: Gopher Robot Reviewed-by: Keith Randall Run-TryBot: Keith Randall --- src/runtime/stack.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/stack.go') 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: -- cgit v1.3