mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: rework handling of udiv on ARM
Instead of populating the aux symbol of CALLudiv during rewrite rules, populate it during genssa. This simplifies the rewrite rules. It also removes all remaining calls to ctxt.Lookup from any rewrite rules. This is a first step towards removing ctxt from ssa.Cache entirely, and also a first step towards converting the obj.LSym.Version field into a boolean. It should also speed up compilation. Also, move func udiv into package runtime. That's where it is anyway, and it lets udiv look and act like the rest of the runtime support functions. Change-Id: I41462a632c14fdc41f61b08049ec13cd80a87bfe Reviewed-on: https://go-review.googlesource.com/41191 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
6e97c71cb7
commit
01b1a34aac
9 changed files with 27 additions and 38 deletions
|
|
@ -622,7 +622,10 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
|
|||
p.From.Offset = v.AuxInt
|
||||
p.To.Type = obj.TYPE_REG
|
||||
p.To.Reg = v.Reg()
|
||||
case ssa.OpARMCALLstatic, ssa.OpARMCALLclosure, ssa.OpARMCALLinter, ssa.OpARMCALLudiv:
|
||||
case ssa.OpARMCALLstatic, ssa.OpARMCALLclosure, ssa.OpARMCALLinter:
|
||||
s.Call(v)
|
||||
case ssa.OpARMCALLudiv:
|
||||
v.Aux = gc.Udiv
|
||||
s.Call(v)
|
||||
case ssa.OpARMDUFFZERO:
|
||||
p := s.Prog(obj.ADUFFZERO)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue