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>
--- /dev/null
+// 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
+)
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
}