mirror of
https://github.com/golang/go
synced 2024-11-19 12:34:47 -07:00
[dev.cc] cmd/internal/obj/ppc64: set Ctxt when allocating Progs
This will get fixed properly upstream, but this will serve for now. Change-Id: I25e5210d190bc7a06a5b9f80724e3360d1a6b10c Reviewed-on: https://go-review.googlesource.com/5121 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
345350bf07
commit
575bdd6753
@ -471,6 +471,7 @@ func span9(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
otxt = p.Pcond.Pc - c
|
||||
if otxt < -(1<<15)+10 || otxt >= (1<<15)-10 {
|
||||
q = new(obj.Prog)
|
||||
q.Ctxt = p.Ctxt
|
||||
q.Link = p.Link
|
||||
p.Link = q
|
||||
q.As = ABR
|
||||
@ -478,6 +479,7 @@ func span9(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
q.Pcond = p.Pcond
|
||||
p.Pcond = q
|
||||
q = new(obj.Prog)
|
||||
q.Ctxt = p.Ctxt
|
||||
q.Link = p.Link
|
||||
p.Link = q
|
||||
q.As = ABR
|
||||
|
@ -515,7 +515,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
p.To.Reg = REGSP
|
||||
p.Spadj = -autosize
|
||||
|
||||
q = new(obj.Prog)
|
||||
q = p.Ctxt.NewProg()
|
||||
q.As = ABR
|
||||
q.Lineno = p.Lineno
|
||||
q.To.Type = obj.TYPE_REG
|
||||
@ -535,7 +535,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
p.To.Type = obj.TYPE_REG
|
||||
p.To.Reg = REGTMP
|
||||
|
||||
q = new(obj.Prog)
|
||||
q = p.Ctxt.NewProg()
|
||||
q.As = AMOVD
|
||||
q.Lineno = p.Lineno
|
||||
q.From.Type = obj.TYPE_REG
|
||||
@ -549,8 +549,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
|
||||
if false {
|
||||
// Debug bad returns
|
||||
q = new(obj.Prog)
|
||||
|
||||
q = p.Ctxt.NewProg()
|
||||
q.As = AMOVD
|
||||
q.Lineno = p.Lineno
|
||||
q.From.Type = obj.TYPE_MEM
|
||||
@ -565,7 +564,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
}
|
||||
|
||||
if autosize != 0 {
|
||||
q = new(obj.Prog)
|
||||
q = p.Ctxt.NewProg()
|
||||
q.As = AADD
|
||||
q.Lineno = p.Lineno
|
||||
q.From.Type = obj.TYPE_CONST
|
||||
@ -578,7 +577,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
p.Link = q
|
||||
}
|
||||
|
||||
q1 = new(obj.Prog)
|
||||
q1 = p.Ctxt.NewProg()
|
||||
q1.As = ABR
|
||||
q1.Lineno = p.Lineno
|
||||
q1.To.Type = obj.TYPE_REG
|
||||
@ -928,7 +927,7 @@ loop:
|
||||
}
|
||||
|
||||
a = ABR
|
||||
q = new(obj.Prog)
|
||||
q = p.Ctxt.NewProg()
|
||||
q.As = int16(a)
|
||||
q.Lineno = p.Lineno
|
||||
q.To.Type = obj.TYPE_BRANCH
|
||||
|
Loading…
Reference in New Issue
Block a user