aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/test
diff options
context:
space:
mode:
authorYoulin Feng <fengyoulin@live.com>2022-10-05 15:29:29 +0800
committerGopher Robot <gobot@golang.org>2022-10-18 18:06:27 +0000
commit7ae652b7c0cddb8f6e04bfa6f5805baac823dd64 (patch)
tree04b02db5fd0e54ac405a67b3ef6b297bffd0fbfb /src/cmd/compile/internal/test
parentc45ebef05edcb217be8f9bf1d7649763132727cc (diff)
downloadgo-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/cmd/compile/internal/test')
-rw-r--r--src/cmd/compile/internal/test/inl_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cmd/compile/internal/test/inl_test.go b/src/cmd/compile/internal/test/inl_test.go
index 285052c0da..c73f49eeb7 100644
--- a/src/cmd/compile/internal/test/inl_test.go
+++ b/src/cmd/compile/internal/test/inl_test.go
@@ -212,19 +212,19 @@ func TestIntendedInlining(t *testing.T) {
}
if runtime.GOARCH != "386" && runtime.GOARCH != "loong64" && runtime.GOARCH != "mips64" && runtime.GOARCH != "mips64le" && runtime.GOARCH != "riscv64" {
- // nextFreeFast calls sys.Ctz64, which on 386 is implemented in asm and is not inlinable.
+ // nextFreeFast calls sys.TrailingZeros64, which on 386 is implemented in asm and is not inlinable.
// We currently don't have midstack inlining so nextFreeFast is also not inlinable on 386.
- // On loong64, mips64x and riscv64, Ctz64 is not intrinsified and causes nextFreeFast too expensive
- // to inline (Issue 22239).
+ // On loong64, mips64x and riscv64, TrailingZeros64 is not intrinsified and causes nextFreeFast
+ // too expensive to inline (Issue 22239).
want["runtime"] = append(want["runtime"], "nextFreeFast")
// Same behavior for heapBits.nextFast.
want["runtime"] = append(want["runtime"], "heapBits.nextFast")
}
if runtime.GOARCH != "386" {
- // As explained above, Ctz64 and Ctz32 are not Go code on 386.
+ // As explained above, TrailingZeros64 and TrailingZeros32 are not Go code on 386.
// The same applies to Bswap32.
- want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "Ctz64")
- want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "Ctz32")
+ want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "TrailingZeros64")
+ want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "TrailingZeros32")
want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "Bswap32")
}
if bits.UintSize == 64 {