From 0652274c10f8f2a520c30bf43bb968dac91bf9f5 Mon Sep 17 00:00:00 2001 From: Meng Zhuo Date: Wed, 3 Nov 2021 16:17:45 +0800 Subject: [PATCH] internal/abi: define riscv64 register ABI constants Add the riscv64 register ABI constants and allow regabi value to be set for riscv64 Change-Id: I3ce98bf9a29d2acc00f92650b27bc59884ed62ad Reviewed-on: https://go-review.googlesource.com/c/go/+/359336 Trust: mzh Reviewed-by: Cherry Mui Run-TryBot: mzh TryBot-Result: Gopher Robot --- src/internal/abi/abi_riscv64.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/internal/abi/abi_riscv64.go diff --git a/src/internal/abi/abi_riscv64.go b/src/internal/abi/abi_riscv64.go new file mode 100644 index 0000000000..1656820577 --- /dev/null +++ b/src/internal/abi/abi_riscv64.go @@ -0,0 +1,19 @@ +// Copyright 2022 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.regabiargs + +package abi + +const ( + // See abi_generic.go. + + // X8 - X23 + IntArgRegs = 16 + + // F8 - F23. + FloatArgRegs = 16 + + EffectiveFloatRegSize = 8 +) -- 2.50.0