Skip to content

Commit 8a9e2d9

Browse files
abner-chencwdvxdr1123
authored andcommitted
cmd/compile: add missing tail calls flag for linux/loong64
Set the value of the variable tailCall to true and prevent allocating or clobber the linker register. Change-Id: I4ec19c67056cb99196911aa7c0054be89ab7eb8d Reviewed-on: https://go-review.googlesource.com/c/go/+/414954 Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: David Chase <[email protected]> Run-TryBot: Wayne Zuo <[email protected]> Reviewed-by: WANG Xuerui <[email protected]>
1 parent c87e69c commit 8a9e2d9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/cmd/compile/internal/ssa/_gen/LOONG64Ops.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ func init() {
270270

271271
// function calls
272272
{name: "CALLstatic", argLength: 1, reg: regInfo{clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true}, // call static function aux.(*obj.LSym). arg0=mem, auxint=argsize, returns mem
273-
{name: "CALLtail", argLength: 1, reg: regInfo{clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true}, // tail call static function aux.(*obj.LSym). arg0=mem, auxint=argsize, returns mem
273+
{name: "CALLtail", argLength: 1, reg: regInfo{clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true, tailCall: true}, // tail call static function aux.(*obj.LSym). arg0=mem, auxint=argsize, returns mem
274274
{name: "CALLclosure", argLength: 3, reg: regInfo{inputs: []regMask{gpsp, buildReg("R29"), 0}, clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true}, // call function via closure. arg0=codeptr, arg1=closure, arg2=mem, auxint=argsize, returns mem
275275
{name: "CALLinter", argLength: 2, reg: regInfo{inputs: []regMask{gp}, clobbers: callerSave}, aux: "CallOff", clobberFlags: true, call: true}, // call fn by pointer. arg0=codeptr, arg1=mem, auxint=argsize, returns mem
276276

src/cmd/compile/internal/ssa/opGen.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)