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:
parent
cceadf8527
commit
9cbdc1d48f
21
src/internal/abi/abi_ppc64x.go
Normal file
21
src/internal/abi/abi_ppc64x.go
Normal 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
|
||||
)
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user