cmd/compile: remove gins

The only remaining consumers of gins were
ginsnop and arch-independent opcodes like GVARDEF.
Rewrite ginsnop to create and populate progs directly.
Move arch-independent opcodes to package gc
and simplify.
Delete some now unused code.
There is more.
Step one towards eliminating gc.Node.Reg.

Change-Id: I7c34cd8a848f6fc3b030705ab8e293838e0b6c20
Reviewed-on: https://go-review.googlesource.com/29220
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2016-09-15 08:07:54 -07:00
parent a06e931abe
commit ad7732a9ac
22 changed files with 62 additions and 973 deletions

View file

@ -24,7 +24,7 @@ func makefuncdatasym(nameprefix string, funcdatakind int64) *Sym {
pnod := newname(sym)
pnod.Class = PEXTERN
Nodconst(&nod, Types[TINT32], funcdatakind)
Thearch.Gins(obj.AFUNCDATA, &nod, pnod)
Gins(obj.AFUNCDATA, &nod, pnod)
return sym
}
@ -96,9 +96,9 @@ func gvardefx(n *Node, as obj.As) {
switch n.Class {
case PAUTO, PPARAM, PPARAMOUT:
if as == obj.AVARLIVE {
Thearch.Gins(as, n, nil)
Gins(as, n, nil)
} else {
Thearch.Gins(as, nil, n)
Gins(as, nil, n)
}
}
}
@ -389,7 +389,7 @@ func compile(fn *Node) {
if isblank(nam) {
nam = nil
}
ptxt := Thearch.Gins(obj.ATEXT, nam, &nod1)
ptxt := Gins(obj.ATEXT, nam, &nod1)
Afunclit(&ptxt.From, Curfn.Func.Nname)
ptxt.From3 = new(obj.Addr)
if fn.Func.Dupok {
@ -443,7 +443,7 @@ func compile(fn *Node) {
switch n.Class {
case PAUTO, PPARAM, PPARAMOUT:
Nodconst(&nod1, Types[TUINTPTR], n.Type.Width)
p := Thearch.Gins(obj.ATYPE, n, &nod1)
p := Gins(obj.ATYPE, n, &nod1)
p.From.Gotype = Linksym(ngotype(n))
}
}