Skip to content

Commit c4190fc

Browse files
committed
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 <[email protected]> Reviewed-by: David Chase <[email protected]>
1 parent 8ac6544 commit c4190fc

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -605,12 +605,6 @@ func (s *regAllocState) init(f *Func) {
605605
// Leaf functions don't save/restore the link register.
606606
s.allocatable &^= 1 << uint(s.f.Config.LinkReg)
607607
}
608-
if s.f.Config.arch == "arm" && objabi.GOARM == 5 {
609-
// On ARMv5 we insert softfloat calls at each FP instruction.
610-
// This clobbers LR almost everywhere. Disable allocating LR
611-
// on ARMv5.
612-
s.allocatable &^= 1 << uint(s.f.Config.LinkReg)
613-
}
614608
}
615609
if s.f.Config.ctxt.Flag_dynlink {
616610
switch s.f.Config.arch {

0 commit comments

Comments
 (0)