aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/ppc64/obj9.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2015-02-17 20:45:23 -0800
committerRob Pike <r@golang.org>2015-02-18 05:01:25 +0000
commit575bdd6753e8c0c722158472ea9275cd463271ee (patch)
tree418ff427b17f59a29937114f07a032f3fce35249 /src/cmd/internal/obj/ppc64/obj9.go
parent345350bf07f1b584bde03b7031c15511b1801d25 (diff)
downloadgo-575bdd6753e8c0c722158472ea9275cd463271ee.tar.xz
[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>
Diffstat (limited to 'src/cmd/internal/obj/ppc64/obj9.go')
-rw-r--r--src/cmd/internal/obj/ppc64/obj9.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/cmd/internal/obj/ppc64/obj9.go b/src/cmd/internal/obj/ppc64/obj9.go
index 2e0ec874fb..4675a9e7b0 100644
--- a/src/cmd/internal/obj/ppc64/obj9.go
+++ b/src/cmd/internal/obj/ppc64/obj9.go
@@ -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