From: Lynn Boger Date: Tue, 17 Aug 2021 18:38:41 +0000 (-0500) Subject: internal/abi: define PPC64 register ABI constants X-Git-Tag: go1.18beta1~1274 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9cbdc1d48f75188f6816259e5f6cbd9ae8458bf9;p=gostls13.git internal/abi: define PPC64 register ABI constants Add the PPC64 register ABI constants, and allow GOEXPERIMENT regabi values to be set for PPC64. Change-Id: I1c9562ae6669c604db69a7b8ad935d1bc117c899 Reviewed-on: https://go-review.googlesource.com/c/go/+/343870 Run-TryBot: Lynn Boger TryBot-Result: Go Bot Reviewed-by: Cherry Mui Trust: Lynn Boger --- diff --git a/src/internal/abi/abi_ppc64x.go b/src/internal/abi/abi_ppc64x.go new file mode 100644 index 0000000000..e38653224a --- /dev/null +++ b/src/internal/abi/abi_ppc64x.go @@ -0,0 +1,21 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build goexperiment.regabireflect && (ppc64 || ppc64le) +// +build goexperiment.regabireflect +// +build ppc64 ppc64le + +package abi + +const ( + // See abi_generic.go. + + // R3 - R10, R14 - R17. + IntArgRegs = 12 + + // F1 - F12. + FloatArgRegs = 12 + + EffectiveFloatRegSize = 8 +) diff --git a/src/internal/buildcfg/exp.go b/src/internal/buildcfg/exp.go index 3844e4f021..7cbe4c804d 100644 --- a/src/internal/buildcfg/exp.go +++ b/src/internal/buildcfg/exp.go @@ -111,8 +111,8 @@ func ParseGOEXPERIMENT(goos, goarch, goexp string) (flags, baseline goexperiment flags.RegabiReflect = true flags.RegabiArgs = true } - // regabi is only supported on amd64 and arm64. - if goarch != "amd64" && goarch != "arm64" { + // regabi is only supported on amd64, arm64, ppc64 and ppc64le. + if goarch != "amd64" && goarch != "arm64" && goarch != "ppc64le" && goarch != "ppc64" { flags.RegabiReflect = false flags.RegabiArgs = false }