Skip to content

Commit 8482559

Browse files
committed
all: merge branch dev.regabi (d3cd483) into master
This CL merges the dev.regabi branch to the master branch. In the dev.regabi branch we have refactored the compiler, and laid some preliminary work for enabling a register-based ABI (issue #40724), including improved late call/return lowering, improved ABI wrapper generation, reflect call prepared for the new ABI, and reserving special registers in the internal ABI. The actual register-based ABI has not been enabled for the moment. The ABI-related changes are behind GOEXPERIMENT=regabi and currently off by default. Updates #40724, #44222. Fixes #44224. Change-Id: Id5de9f734d14099267ab717167aaaeef31fdba70
2 parents 5faf941 + d3cd483 commit 8482559

File tree

506 files changed

+51193
-45035
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

506 files changed

+51193
-45035
lines changed

src/cmd/asm/internal/arch/arch.go

+4
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ func archX86(linkArch *obj.LinkArch) *Arch {
109109
register["SB"] = RSB
110110
register["FP"] = RFP
111111
register["PC"] = RPC
112+
if linkArch == &x86.Linkamd64 {
113+
// Alias g to R14
114+
register["g"] = x86.REGG
115+
}
112116
// Register prefix not used on this architecture.
113117

114118
instructions := make(map[string]obj.As)

src/cmd/asm/internal/asm/operand_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ var amd64OperandTests = []operandTest{
259259
{"R15", "R15"},
260260
{"R8", "R8"},
261261
{"R9", "R9"},
262+
{"g", "R14"},
262263
{"SI", "SI"},
263264
{"SP", "SP"},
264265
{"X0", "X0"},

src/cmd/asm/internal/asm/parse.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ func (p *Parser) pseudo(word string, operands [][]lex.Token) bool {
305305
// references and writes symabis information to w.
306306
//
307307
// The symabis format is documented at
308-
// cmd/compile/internal/gc.readSymABIs.
308+
// cmd/compile/internal/ssagen.ReadSymABIs.
309309
func (p *Parser) symDefRef(w io.Writer, word string, operands [][]lex.Token) {
310310
switch word {
311311
case "TEXT":

0 commit comments

Comments
 (0)