mirror of
https://github.com/golang/go
synced 2024-11-19 09:44:46 -07:00
cmd/compile/internal/gc: remove Thearch.Linkarchinit
Change-Id: I8e990204c7a1e65d6b8e4262f6b5b9bd0cb3540c Reviewed-on: https://go-review.googlesource.com/20725 Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
70090654de
commit
cea5d26aa2
@ -11,23 +11,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
thestring = "amd64"
|
|
||||||
thelinkarch = &x86.Linkamd64
|
|
||||||
addptr = x86.AADDQ
|
addptr = x86.AADDQ
|
||||||
movptr = x86.AMOVQ
|
movptr = x86.AMOVQ
|
||||||
leaptr = x86.ALEAQ
|
leaptr = x86.ALEAQ
|
||||||
cmpptr = x86.ACMPQ
|
cmpptr = x86.ACMPQ
|
||||||
)
|
)
|
||||||
|
|
||||||
func linkarchinit() {
|
|
||||||
if obj.Getgoarch() == "amd64p32" {
|
|
||||||
thelinkarch = &x86.Linkamd64p32
|
|
||||||
gc.Thearch.Thelinkarch = thelinkarch
|
|
||||||
thestring = "amd64p32"
|
|
||||||
gc.Thearch.Thestring = "amd64p32"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func betypeinit() {
|
func betypeinit() {
|
||||||
gc.Widthptr = 8
|
gc.Widthptr = 8
|
||||||
gc.Widthint = 8
|
gc.Widthint = 8
|
||||||
@ -54,8 +43,12 @@ func Main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gc.Thearch.Thechar = '6'
|
gc.Thearch.Thechar = '6'
|
||||||
gc.Thearch.Thestring = thestring
|
gc.Thearch.Thestring = "amd64"
|
||||||
gc.Thearch.Thelinkarch = thelinkarch
|
gc.Thearch.Thelinkarch = &x86.Linkamd64
|
||||||
|
if obj.Getgoarch() == "amd64p32" {
|
||||||
|
gc.Thearch.Thestring = "amd64p32"
|
||||||
|
gc.Thearch.Thelinkarch = &x86.Linkamd64p32
|
||||||
|
}
|
||||||
gc.Thearch.REGSP = x86.REGSP
|
gc.Thearch.REGSP = x86.REGSP
|
||||||
gc.Thearch.REGCTXT = x86.REGCTXT
|
gc.Thearch.REGCTXT = x86.REGCTXT
|
||||||
gc.Thearch.REGCALLX = x86.REG_BX
|
gc.Thearch.REGCALLX = x86.REG_BX
|
||||||
@ -85,7 +78,6 @@ func Main() {
|
|||||||
gc.Thearch.Ginscon = ginscon
|
gc.Thearch.Ginscon = ginscon
|
||||||
gc.Thearch.Ginsnop = ginsnop
|
gc.Thearch.Ginsnop = ginsnop
|
||||||
gc.Thearch.Gmove = gmove
|
gc.Thearch.Gmove = gmove
|
||||||
gc.Thearch.Linkarchinit = linkarchinit
|
|
||||||
gc.Thearch.Peep = peep
|
gc.Thearch.Peep = peep
|
||||||
gc.Thearch.Proginfo = proginfo
|
gc.Thearch.Proginfo = proginfo
|
||||||
gc.Thearch.Regtyp = regtyp
|
gc.Thearch.Regtyp = regtyp
|
||||||
|
@ -9,9 +9,6 @@ import (
|
|||||||
"cmd/internal/obj/arm"
|
"cmd/internal/obj/arm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func linkarchinit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
func betypeinit() {
|
func betypeinit() {
|
||||||
gc.Widthptr = 4
|
gc.Widthptr = 4
|
||||||
gc.Widthint = 4
|
gc.Widthint = 4
|
||||||
@ -50,7 +47,6 @@ func Main() {
|
|||||||
gc.Thearch.Ginsnop = ginsnop
|
gc.Thearch.Ginsnop = ginsnop
|
||||||
gc.Thearch.Gmove = gmove
|
gc.Thearch.Gmove = gmove
|
||||||
gc.Thearch.Cgenindex = cgenindex
|
gc.Thearch.Cgenindex = cgenindex
|
||||||
gc.Thearch.Linkarchinit = linkarchinit
|
|
||||||
gc.Thearch.Peep = peep
|
gc.Thearch.Peep = peep
|
||||||
gc.Thearch.Proginfo = proginfo
|
gc.Thearch.Proginfo = proginfo
|
||||||
gc.Thearch.Regtyp = regtyp
|
gc.Thearch.Regtyp = regtyp
|
||||||
|
@ -9,9 +9,6 @@ import (
|
|||||||
"cmd/internal/obj/arm64"
|
"cmd/internal/obj/arm64"
|
||||||
)
|
)
|
||||||
|
|
||||||
func linkarchinit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
func betypeinit() {
|
func betypeinit() {
|
||||||
gc.Widthptr = 8
|
gc.Widthptr = 8
|
||||||
gc.Widthint = 8
|
gc.Widthint = 8
|
||||||
@ -49,7 +46,6 @@ func Main() {
|
|||||||
gc.Thearch.Ginscon = ginscon
|
gc.Thearch.Ginscon = ginscon
|
||||||
gc.Thearch.Ginsnop = ginsnop
|
gc.Thearch.Ginsnop = ginsnop
|
||||||
gc.Thearch.Gmove = gmove
|
gc.Thearch.Gmove = gmove
|
||||||
gc.Thearch.Linkarchinit = linkarchinit
|
|
||||||
gc.Thearch.Peep = peep
|
gc.Thearch.Peep = peep
|
||||||
gc.Thearch.Proginfo = proginfo
|
gc.Thearch.Proginfo = proginfo
|
||||||
gc.Thearch.Regtyp = regtyp
|
gc.Thearch.Regtyp = regtyp
|
||||||
|
@ -543,7 +543,6 @@ type Arch struct {
|
|||||||
Ginsnop func()
|
Ginsnop func()
|
||||||
Gmove func(*Node, *Node)
|
Gmove func(*Node, *Node)
|
||||||
Igenindex func(*Node, *Node, bool) *obj.Prog
|
Igenindex func(*Node, *Node, bool) *obj.Prog
|
||||||
Linkarchinit func()
|
|
||||||
Peep func(*obj.Prog)
|
Peep func(*obj.Prog)
|
||||||
Proginfo func(*obj.Prog) // fills in Prog.Info
|
Proginfo func(*obj.Prog) // fills in Prog.Info
|
||||||
Regtyp func(*obj.Addr) bool
|
Regtyp func(*obj.Addr) bool
|
||||||
|
@ -98,7 +98,6 @@ func Main() {
|
|||||||
}
|
}
|
||||||
goarch = p
|
goarch = p
|
||||||
|
|
||||||
Thearch.Linkarchinit()
|
|
||||||
Ctxt = obj.Linknew(Thearch.Thelinkarch)
|
Ctxt = obj.Linknew(Thearch.Thelinkarch)
|
||||||
Ctxt.DiagFunc = Yyerror
|
Ctxt.DiagFunc = Yyerror
|
||||||
Ctxt.Bso = &bstdout
|
Ctxt.Bso = &bstdout
|
||||||
|
@ -10,22 +10,6 @@ import (
|
|||||||
"cmd/internal/obj/mips"
|
"cmd/internal/obj/mips"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
|
||||||
thestring = "mips64"
|
|
||||||
thelinkarch *obj.LinkArch
|
|
||||||
)
|
|
||||||
|
|
||||||
func linkarchinit() {
|
|
||||||
thestring = obj.Getgoarch()
|
|
||||||
gc.Thearch.Thestring = thestring
|
|
||||||
if thestring == "mips64le" {
|
|
||||||
thelinkarch = &mips.Linkmips64le
|
|
||||||
} else {
|
|
||||||
thelinkarch = &mips.Linkmips64
|
|
||||||
}
|
|
||||||
gc.Thearch.Thelinkarch = thelinkarch
|
|
||||||
}
|
|
||||||
|
|
||||||
func betypeinit() {
|
func betypeinit() {
|
||||||
gc.Widthptr = 8
|
gc.Widthptr = 8
|
||||||
gc.Widthint = 8
|
gc.Widthint = 8
|
||||||
@ -34,8 +18,12 @@ func betypeinit() {
|
|||||||
|
|
||||||
func Main() {
|
func Main() {
|
||||||
gc.Thearch.Thechar = '0'
|
gc.Thearch.Thechar = '0'
|
||||||
gc.Thearch.Thestring = thestring
|
gc.Thearch.Thestring = "mips64"
|
||||||
gc.Thearch.Thelinkarch = thelinkarch
|
gc.Thearch.Thelinkarch = &mips.Linkmips64
|
||||||
|
if obj.Getgoarch() == "mips64le" {
|
||||||
|
gc.Thearch.Thestring = "mips64le"
|
||||||
|
gc.Thearch.Thelinkarch = &mips.Linkmips64le
|
||||||
|
}
|
||||||
gc.Thearch.REGSP = mips.REGSP
|
gc.Thearch.REGSP = mips.REGSP
|
||||||
gc.Thearch.REGCTXT = mips.REGCTXT
|
gc.Thearch.REGCTXT = mips.REGCTXT
|
||||||
gc.Thearch.REGCALLX = mips.REG_R1
|
gc.Thearch.REGCALLX = mips.REG_R1
|
||||||
@ -62,7 +50,6 @@ func Main() {
|
|||||||
gc.Thearch.Ginscon = ginscon
|
gc.Thearch.Ginscon = ginscon
|
||||||
gc.Thearch.Ginsnop = ginsnop
|
gc.Thearch.Ginsnop = ginsnop
|
||||||
gc.Thearch.Gmove = gmove
|
gc.Thearch.Gmove = gmove
|
||||||
gc.Thearch.Linkarchinit = linkarchinit
|
|
||||||
gc.Thearch.Peep = peep
|
gc.Thearch.Peep = peep
|
||||||
gc.Thearch.Proginfo = proginfo
|
gc.Thearch.Proginfo = proginfo
|
||||||
gc.Thearch.Regtyp = regtyp
|
gc.Thearch.Regtyp = regtyp
|
||||||
|
@ -10,22 +10,6 @@ import (
|
|||||||
"cmd/internal/obj/ppc64"
|
"cmd/internal/obj/ppc64"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
|
||||||
thestring = "ppc64"
|
|
||||||
thelinkarch *obj.LinkArch
|
|
||||||
)
|
|
||||||
|
|
||||||
func linkarchinit() {
|
|
||||||
thestring = obj.Getgoarch()
|
|
||||||
gc.Thearch.Thestring = thestring
|
|
||||||
if thestring == "ppc64le" {
|
|
||||||
thelinkarch = &ppc64.Linkppc64le
|
|
||||||
} else {
|
|
||||||
thelinkarch = &ppc64.Linkppc64
|
|
||||||
}
|
|
||||||
gc.Thearch.Thelinkarch = thelinkarch
|
|
||||||
}
|
|
||||||
|
|
||||||
func betypeinit() {
|
func betypeinit() {
|
||||||
gc.Widthptr = 8
|
gc.Widthptr = 8
|
||||||
gc.Widthint = 8
|
gc.Widthint = 8
|
||||||
@ -39,8 +23,12 @@ func betypeinit() {
|
|||||||
|
|
||||||
func Main() {
|
func Main() {
|
||||||
gc.Thearch.Thechar = '9'
|
gc.Thearch.Thechar = '9'
|
||||||
gc.Thearch.Thestring = thestring
|
gc.Thearch.Thestring = "ppc64"
|
||||||
gc.Thearch.Thelinkarch = thelinkarch
|
gc.Thearch.Thelinkarch = &ppc64.Linkppc64
|
||||||
|
if obj.Getgoarch() == "ppc64le" {
|
||||||
|
gc.Thearch.Thestring = "ppc64le"
|
||||||
|
gc.Thearch.Thelinkarch = &ppc64.Linkppc64le
|
||||||
|
}
|
||||||
gc.Thearch.REGSP = ppc64.REGSP
|
gc.Thearch.REGSP = ppc64.REGSP
|
||||||
gc.Thearch.REGCTXT = ppc64.REGCTXT
|
gc.Thearch.REGCTXT = ppc64.REGCTXT
|
||||||
gc.Thearch.REGCALLX = ppc64.REG_R3
|
gc.Thearch.REGCALLX = ppc64.REG_R3
|
||||||
@ -67,7 +55,6 @@ func Main() {
|
|||||||
gc.Thearch.Ginscon = ginscon
|
gc.Thearch.Ginscon = ginscon
|
||||||
gc.Thearch.Ginsnop = ginsnop
|
gc.Thearch.Ginsnop = ginsnop
|
||||||
gc.Thearch.Gmove = gmove
|
gc.Thearch.Gmove = gmove
|
||||||
gc.Thearch.Linkarchinit = linkarchinit
|
|
||||||
gc.Thearch.Peep = peep
|
gc.Thearch.Peep = peep
|
||||||
gc.Thearch.Proginfo = proginfo
|
gc.Thearch.Proginfo = proginfo
|
||||||
gc.Thearch.Regtyp = regtyp
|
gc.Thearch.Regtyp = regtyp
|
||||||
|
@ -12,9 +12,6 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
func linkarchinit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
func betypeinit() {
|
func betypeinit() {
|
||||||
gc.Widthptr = 4
|
gc.Widthptr = 4
|
||||||
gc.Widthint = 4
|
gc.Widthint = 4
|
||||||
@ -67,7 +64,6 @@ func Main() {
|
|||||||
gc.Thearch.Ginsnop = ginsnop
|
gc.Thearch.Ginsnop = ginsnop
|
||||||
gc.Thearch.Gmove = gmove
|
gc.Thearch.Gmove = gmove
|
||||||
gc.Thearch.Igenindex = igenindex
|
gc.Thearch.Igenindex = igenindex
|
||||||
gc.Thearch.Linkarchinit = linkarchinit
|
|
||||||
gc.Thearch.Peep = peep
|
gc.Thearch.Peep = peep
|
||||||
gc.Thearch.Proginfo = proginfo
|
gc.Thearch.Proginfo = proginfo
|
||||||
gc.Thearch.Regtyp = regtyp
|
gc.Thearch.Regtyp = regtyp
|
||||||
|
Loading…
Reference in New Issue
Block a user