From: Rhys Hiltner Date: Fri, 14 Mar 2025 19:04:51 +0000 (-0700) Subject: internal/buildcfg: expand spinbitmutex platforms X-Git-Tag: go1.25rc1~687 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5e9820245574bdf67f28156db4b00191b1b3696f;p=gostls13.git internal/buildcfg: expand spinbitmutex platforms Go 1.24 included the spinbitmutex GOEXPERIMENT for several popular architectures, based on their native support an atomic primitive (8-bit exchange) that aided its efficient implementation. Move towards making the new mutex implementation permanent, so it fully replaces the two previous (sema- and futex-based "tristate") implementations. For #68578 Change-Id: I888a73959df42eb0ec53875309c446675af8f09d Reviewed-on: https://go-review.googlesource.com/c/go/+/658455 Reviewed-by: David Chase LUCI-TryBot-Result: Go LUCI Auto-Submit: Rhys Hiltner Reviewed-by: Michael Knyszek --- diff --git a/src/internal/buildcfg/exp.go b/src/internal/buildcfg/exp.go index 8fb4beb7c9..ccdf465ffb 100644 --- a/src/internal/buildcfg/exp.go +++ b/src/internal/buildcfg/exp.go @@ -67,11 +67,7 @@ func ParseGOEXPERIMENT(goos, goarch, goexp string) (*ExperimentFlags, error) { regabiSupported = true } - var haveXchg8 bool - switch goarch { - case "386", "amd64", "arm", "arm64", "ppc64le", "ppc64": - haveXchg8 = true - } + haveThreads := goarch != "wasm" // Older versions (anything before V16) of dsymutil don't handle // the .debug_rnglists section in DWARF5. See @@ -89,7 +85,7 @@ func ParseGOEXPERIMENT(goos, goarch, goexp string) (*ExperimentFlags, error) { RegabiArgs: regabiSupported, AliasTypeParams: true, SwissMap: true, - SpinbitMutex: haveXchg8, + SpinbitMutex: haveThreads, SyncHashTrieMap: true, Dwarf5: dwarf5Supported, }