Skip to content

Commit

Permalink
all: merge branch dev.regabi (d3cd483) into master
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cherrymui committed Feb 16, 2021
2 parents 5faf941 + d3cd483 commit 8482559
Show file tree
Hide file tree
Showing 506 changed files with 51,193 additions and 45,035 deletions.
4 changes: 4 additions & 0 deletions src/cmd/asm/internal/arch/arch.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ func archX86(linkArch *obj.LinkArch) *Arch {
register["SB"] = RSB
register["FP"] = RFP
register["PC"] = RPC
if linkArch == &x86.Linkamd64 {
// Alias g to R14
register["g"] = x86.REGG
}
// Register prefix not used on this architecture.

instructions := make(map[string]obj.As)
Expand Down
1 change: 1 addition & 0 deletions src/cmd/asm/internal/asm/operand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ var amd64OperandTests = []operandTest{
{"R15", "R15"},
{"R8", "R8"},
{"R9", "R9"},
{"g", "R14"},
{"SI", "SI"},
{"SP", "SP"},
{"X0", "X0"},
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/asm/internal/asm/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func (p *Parser) pseudo(word string, operands [][]lex.Token) bool {
// references and writes symabis information to w.
//
// The symabis format is documented at
// cmd/compile/internal/gc.readSymABIs.
// cmd/compile/internal/ssagen.ReadSymABIs.
func (p *Parser) symDefRef(w io.Writer, word string, operands [][]lex.Token) {
switch word {
case "TEXT":
Expand Down
Loading

0 comments on commit 8482559

Please sign in to comment.