mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile,cmd/internal/obj: replace Ctxt.FixedFrameSize method with Arch field
And delete now-unused FixedFrameSize methods. Change-Id: Id257e1647dbeb4eb4ab866c53744010c4efeb953 Reviewed-on: https://go-review.googlesource.com/c/go/+/400819 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
8af7fac5a1
commit
5f625de4d0
31 changed files with 58 additions and 74 deletions
|
|
@ -140,7 +140,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
|
|||
|
||||
p := c.cursym.Func().Text
|
||||
textstksiz := p.To.Offset
|
||||
if textstksiz == -ctxt.FixedFrameSize() {
|
||||
if textstksiz == -ctxt.Arch.FixedFrameSize {
|
||||
// Historical way to mark NOFRAME.
|
||||
p.From.Sym.Set(obj.AttrNoFrame, true)
|
||||
textstksiz = 0
|
||||
|
|
@ -282,7 +282,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
|
|||
if !p.From.Sym.NoFrame() {
|
||||
// If there is a stack frame at all, it includes
|
||||
// space to save the LR.
|
||||
autosize += int32(c.ctxt.FixedFrameSize())
|
||||
autosize += int32(c.ctxt.Arch.FixedFrameSize)
|
||||
}
|
||||
|
||||
if autosize&4 != 0 && c.ctxt.Arch.Family == sys.MIPS64 {
|
||||
|
|
@ -299,7 +299,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
|
|||
}
|
||||
}
|
||||
|
||||
p.To.Offset = int64(autosize) - ctxt.FixedFrameSize()
|
||||
p.To.Offset = int64(autosize) - ctxt.Arch.FixedFrameSize
|
||||
|
||||
if c.cursym.Func().Text.Mark&LEAF != 0 {
|
||||
c.cursym.Set(obj.AttrLeaf, true)
|
||||
|
|
@ -392,7 +392,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
|
|||
q = obj.Appendp(q, newprog)
|
||||
q.As = add
|
||||
q.From.Type = obj.TYPE_CONST
|
||||
q.From.Offset = int64(autosize) + ctxt.FixedFrameSize()
|
||||
q.From.Offset = int64(autosize) + ctxt.Arch.FixedFrameSize
|
||||
q.Reg = REGSP
|
||||
q.To.Type = obj.TYPE_REG
|
||||
q.To.Reg = REG_R3
|
||||
|
|
@ -409,7 +409,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
|
|||
q = obj.Appendp(q, newprog)
|
||||
q.As = add
|
||||
q.From.Type = obj.TYPE_CONST
|
||||
q.From.Offset = ctxt.FixedFrameSize()
|
||||
q.From.Offset = ctxt.Arch.FixedFrameSize
|
||||
q.Reg = REGSP
|
||||
q.To.Type = obj.TYPE_REG
|
||||
q.To.Reg = REG_R2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue