mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: implement simple register results
at least for ints and strings includes simple test For #40724. Change-Id: Ib8484e5b957b08f961574a67cfd93d3d26551558 Reviewed-on: https://go-review.googlesource.com/c/go/+/295309 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
2d30c94874
commit
9d88a9e2bf
7 changed files with 164 additions and 23 deletions
|
|
@ -830,6 +830,9 @@ func (s *regAllocState) regspec(v *Value) regInfo {
|
|||
return *ac.Reg(&opcodeTable[op].reg, s.f.Config)
|
||||
}
|
||||
}
|
||||
if op == OpMakeResult && s.f.OwnAux.reg != nil {
|
||||
return *s.f.OwnAux.ResultReg(s.f.Config)
|
||||
}
|
||||
return opcodeTable[op].reg
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue