mirror of
https://github.com/golang/go
synced 2024-11-26 08:38:01 -07:00
cmd/compile: remove ARMv5 special case in register allocator
The register allocator has a special case that doesn't allocate LR on ARMv5. This was necessary when softfloat expansion was done by the assembler. Now softfloat calls are inserted by SSA, so it works as normal. Remove this special case. Change-Id: I5502f07597f4d4b675dc16b6b0d7cb47e1e8974b Reviewed-on: https://go-review.googlesource.com/c/go/+/301792 Trust: Cherry Zhang <cherryyz@google.com> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
8ac6544564
commit
c4190fc34d
@ -605,12 +605,6 @@ func (s *regAllocState) init(f *Func) {
|
|||||||
// Leaf functions don't save/restore the link register.
|
// Leaf functions don't save/restore the link register.
|
||||||
s.allocatable &^= 1 << uint(s.f.Config.LinkReg)
|
s.allocatable &^= 1 << uint(s.f.Config.LinkReg)
|
||||||
}
|
}
|
||||||
if s.f.Config.arch == "arm" && objabi.GOARM == 5 {
|
|
||||||
// On ARMv5 we insert softfloat calls at each FP instruction.
|
|
||||||
// This clobbers LR almost everywhere. Disable allocating LR
|
|
||||||
// on ARMv5.
|
|
||||||
s.allocatable &^= 1 << uint(s.f.Config.LinkReg)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if s.f.Config.ctxt.Flag_dynlink {
|
if s.f.Config.ctxt.Flag_dynlink {
|
||||||
switch s.f.Config.arch {
|
switch s.f.Config.arch {
|
||||||
|
Loading…
Reference in New Issue
Block a user