mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: ensure we don't reuse temporary register
Before this CL, we could use the same register for both a temporary register and for moving a value in the output register out of the way. Fixes #71857 Change-Id: Iefbfd9d4139136174570d8aadf8a0fb391791ea9 Reviewed-on: https://go-review.googlesource.com/c/go/+/651221 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com>
This commit is contained in:
parent
1e92ff11f5
commit
cc16fb52e6
2 changed files with 30 additions and 0 deletions
|
|
@ -1677,6 +1677,7 @@ func (s *regAllocState) regalloc(f *Func) {
|
|||
}
|
||||
tmpReg = s.allocReg(m, &tmpVal)
|
||||
s.nospill |= regMask(1) << tmpReg
|
||||
s.tmpused |= regMask(1) << tmpReg
|
||||
}
|
||||
|
||||
// Now that all args are in regs, we're ready to issue the value itself.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue