mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: intrinsify Ctz, Bswap, and some atomics on ARM64
Change-Id: Ia5bf72b70e6f6522d6fb8cd050e78f862d37b5ae Reviewed-on: https://go-review.googlesource.com/27936 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
daa7c607d2
commit
4354ffd38b
12 changed files with 801 additions and 71 deletions
|
|
@ -1189,8 +1189,10 @@ func (s *regAllocState) regalloc(f *Func) {
|
|||
// Before we pick a register for the output value, allow input registers
|
||||
// to be deallocated. We do this here so that the output can use the
|
||||
// same register as a dying input.
|
||||
s.nospill = 0
|
||||
s.advanceUses(v) // frees any registers holding args that are no longer live
|
||||
if !opcodeTable[v.Op].resultNotInArgs {
|
||||
s.nospill = 0
|
||||
s.advanceUses(v) // frees any registers holding args that are no longer live
|
||||
}
|
||||
|
||||
// Dump any registers which will be clobbered
|
||||
s.freeRegs(regspec.clobbers)
|
||||
|
|
@ -1264,6 +1266,12 @@ func (s *regAllocState) regalloc(f *Func) {
|
|||
}
|
||||
}
|
||||
|
||||
// deallocate dead args, if we have not done so
|
||||
if opcodeTable[v.Op].resultNotInArgs {
|
||||
s.nospill = 0
|
||||
s.advanceUses(v) // frees any registers holding args that are no longer live
|
||||
}
|
||||
|
||||
// Issue the Value itself.
|
||||
for i, a := range args {
|
||||
v.SetArg(i, a) // use register version of arguments
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue