Commit 575bdd67 authored by Rob Pike's avatar Rob Pike

[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/5121Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent 345350bf
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment