1
0
mirror of https://github.com/golang/go synced 2024-11-17 10:04:43 -07:00

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 <laboger@linux.vnet.ibm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Trust: Lynn Boger <laboger@linux.vnet.ibm.com>
This commit is contained in:
Lynn Boger 2021-08-17 13:38:41 -05:00
parent cceadf8527
commit 9cbdc1d48f
2 changed files with 23 additions and 2 deletions

View File

@ -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
)

View File

@ -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
}