Skip to content

Commit

Permalink
internal/abi: set register count constants to zero for regabi experiment
Browse files Browse the repository at this point in the history
This change sets the register count constants to zero for the
GOEXPERIMENT regabi because currently the users of it (i.e. reflect)
will be broken, since they expect Go functions that implement the new
ABI.

Change-Id: Id3e874c61821a36605eb4e1cccdee36a2759f303
Reviewed-on: https://go-review.googlesource.com/c/go/+/292649
Reviewed-by: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
  • Loading branch information
mknyszek committed Feb 16, 2021
1 parent d28aae2 commit 8cfbf34
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/internal/abi/abi_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ package abi
const (
// See abi_generic.go.

// Currently these values are zero because whatever uses
// them will expect the register ABI, which isn't ready
// yet.

// RAX, RBX, RCX, RDI, RSI, R8, R9, R10, R11.
IntArgRegs = 9
IntArgRegs = 0 // 9

// X0 -> X14.
FloatArgRegs = 15
FloatArgRegs = 0 // 15

// We use SSE2 registers which support 64-bit float operations.
EffectiveFloatRegSize = 8
EffectiveFloatRegSize = 0 // 8
)

0 comments on commit 8cfbf34

Please sign in to comment.