]> Cypherpunks repositories - gostls13.git/commitdiff
internal/abi, internal/buildcfg: always enable register ABI on riscv64
authorWayne Zuo <wdvxdr@golangcn.org>
Mon, 17 Oct 2022 09:38:50 +0000 (17:38 +0800)
committerMeng Zhuo <mzh@golangcn.org>
Mon, 24 Oct 2022 03:45:54 +0000 (03:45 +0000)
In Go 1.19, we develop register ABI for riscv64, enabled by default as a
GOEXPERIMENT. We can turn it on all the time in Go 1.20.

Change-Id: Ie8e2ac8b8bd3ebddb0dc6d58a5599547fb440e03
Reviewed-on: https://go-review.googlesource.com/c/go/+/443555
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/internal/abi/abi_generic.go
src/internal/abi/abi_riscv64.go
src/internal/buildcfg/exp.go

index d5803e70d2b310cf11d1b8eb898b4bd49f6f3158..76ef2e28986605d1deeb778ba3faf047ed2d1eda 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build !goexperiment.regabiargs && !amd64 && !arm64 && !ppc64 && !ppc64le
+//go:build !goexperiment.regabiargs && !amd64 && !arm64 && !ppc64 && !ppc64le && !riscv64
 
 package abi
 
index 165682057733a474b7116a5fcbfad38331470046..2bcd9d6db21bd70e818cb7d48f8136da83079ce6 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build goexperiment.regabiargs
-
 package abi
 
 const (
index 8531aac9080da0deb5bde0333d22b4d8eaef9aaf..71f8f5648d4c2d12bd240c3afafcc55182af026b 100644 (file)
@@ -62,11 +62,9 @@ func ParseGOEXPERIMENT(goos, goarch, goexp string) (*ExperimentFlags, error) {
        // always on.
        var regabiSupported, regabiAlwaysOn bool
        switch goarch {
-       case "amd64", "arm64", "ppc64le", "ppc64":
+       case "amd64", "arm64", "ppc64le", "ppc64", "riscv64":
                regabiAlwaysOn = true
                regabiSupported = true
-       case "riscv64":
-               regabiSupported = true
        }
 
        baseline := goexperiment.Flags{