Commit 544010a0 authored by Matthew Dempsky's avatar Matthew Dempsky

cmd/compile: remove Betypeinit

Change-Id: I5c2fd0ff1b49f3826f2b9869b0b11329804b0e2a
Reviewed-on: https://go-review.googlesource.com/29244
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarDave Cheney <dave@cheney.net>
parent 1f2930cb
...@@ -10,26 +10,18 @@ import ( ...@@ -10,26 +10,18 @@ import (
"cmd/internal/obj/x86" "cmd/internal/obj/x86"
) )
var ( var leaptr = x86.ALEAQ
leaptr = x86.ALEAQ
)
func betypeinit() {
if obj.GOARCH == "amd64p32" {
leaptr = x86.ALEAL
}
}
func Main() { func Main() {
gc.Thearch.LinkArch = &x86.Linkamd64 gc.Thearch.LinkArch = &x86.Linkamd64
if obj.GOARCH == "amd64p32" { if obj.GOARCH == "amd64p32" {
gc.Thearch.LinkArch = &x86.Linkamd64p32 gc.Thearch.LinkArch = &x86.Linkamd64p32
leaptr = x86.ALEAL
} }
gc.Thearch.REGSP = x86.REGSP gc.Thearch.REGSP = x86.REGSP
gc.Thearch.REGCTXT = x86.REGCTXT gc.Thearch.REGCTXT = x86.REGCTXT
gc.Thearch.MAXWIDTH = 1 << 50 gc.Thearch.MAXWIDTH = 1 << 50
gc.Thearch.Betypeinit = betypeinit
gc.Thearch.Defframe = defframe gc.Thearch.Defframe = defframe
gc.Thearch.Proginfo = proginfo gc.Thearch.Proginfo = proginfo
......
...@@ -10,16 +10,12 @@ import ( ...@@ -10,16 +10,12 @@ import (
"cmd/internal/obj/arm" "cmd/internal/obj/arm"
) )
func betypeinit() {
}
func Main() { func Main() {
gc.Thearch.LinkArch = &arm.Linkarm gc.Thearch.LinkArch = &arm.Linkarm
gc.Thearch.REGSP = arm.REGSP gc.Thearch.REGSP = arm.REGSP
gc.Thearch.REGCTXT = arm.REGCTXT gc.Thearch.REGCTXT = arm.REGCTXT
gc.Thearch.MAXWIDTH = (1 << 32) - 1 gc.Thearch.MAXWIDTH = (1 << 32) - 1
gc.Thearch.Betypeinit = betypeinit
gc.Thearch.Defframe = defframe gc.Thearch.Defframe = defframe
gc.Thearch.Proginfo = proginfo gc.Thearch.Proginfo = proginfo
......
...@@ -10,16 +10,12 @@ import ( ...@@ -10,16 +10,12 @@ import (
"cmd/internal/obj/arm64" "cmd/internal/obj/arm64"
) )
func betypeinit() {
}
func Main() { func Main() {
gc.Thearch.LinkArch = &arm64.Linkarm64 gc.Thearch.LinkArch = &arm64.Linkarm64
gc.Thearch.REGSP = arm64.REGSP gc.Thearch.REGSP = arm64.REGSP
gc.Thearch.REGCTXT = arm64.REGCTXT gc.Thearch.REGCTXT = arm64.REGCTXT
gc.Thearch.MAXWIDTH = 1 << 50 gc.Thearch.MAXWIDTH = 1 << 50
gc.Thearch.Betypeinit = betypeinit
gc.Thearch.Defframe = defframe gc.Thearch.Defframe = defframe
gc.Thearch.Proginfo = proginfo gc.Thearch.Proginfo = proginfo
......
...@@ -359,10 +359,9 @@ type Arch struct { ...@@ -359,10 +359,9 @@ type Arch struct {
REGCTXT int REGCTXT int
MAXWIDTH int64 MAXWIDTH int64
Betypeinit func() Defframe func(*obj.Prog)
Defframe func(*obj.Prog) Proginfo func(*obj.Prog) // fills in Prog.Info
Proginfo func(*obj.Prog) // fills in Prog.Info Use387 bool // should 8g use 387 FP instructions instead of sse2.
Use387 bool // should 8g use 387 FP instructions instead of sse2.
// SSARegToReg maps ssa register numbers to obj register numbers. // SSARegToReg maps ssa register numbers to obj register numbers.
SSARegToReg []int16 SSARegToReg []int16
......
...@@ -291,7 +291,6 @@ func Main() { ...@@ -291,7 +291,6 @@ func Main() {
Debug['l'] = 1 - Debug['l'] Debug['l'] = 1 - Debug['l']
} }
Thearch.Betypeinit()
Widthint = Thearch.LinkArch.IntSize Widthint = Thearch.LinkArch.IntSize
Widthptr = Thearch.LinkArch.PtrSize Widthptr = Thearch.LinkArch.PtrSize
Widthreg = Thearch.LinkArch.RegSize Widthreg = Thearch.LinkArch.RegSize
......
...@@ -11,9 +11,6 @@ import ( ...@@ -11,9 +11,6 @@ import (
"cmd/internal/obj/mips" "cmd/internal/obj/mips"
) )
func betypeinit() {
}
func Main() { func Main() {
gc.Thearch.LinkArch = &mips.Linkmips64 gc.Thearch.LinkArch = &mips.Linkmips64
if obj.GOARCH == "mips64le" { if obj.GOARCH == "mips64le" {
...@@ -23,7 +20,6 @@ func Main() { ...@@ -23,7 +20,6 @@ func Main() {
gc.Thearch.REGCTXT = mips.REGCTXT gc.Thearch.REGCTXT = mips.REGCTXT
gc.Thearch.MAXWIDTH = 1 << 50 gc.Thearch.MAXWIDTH = 1 << 50
gc.Thearch.Betypeinit = betypeinit
gc.Thearch.Defframe = defframe gc.Thearch.Defframe = defframe
gc.Thearch.Proginfo = proginfo gc.Thearch.Proginfo = proginfo
......
...@@ -10,9 +10,6 @@ import ( ...@@ -10,9 +10,6 @@ import (
"cmd/internal/obj/ppc64" "cmd/internal/obj/ppc64"
) )
func betypeinit() {
}
func Main() { func Main() {
gc.Thearch.LinkArch = &ppc64.Linkppc64 gc.Thearch.LinkArch = &ppc64.Linkppc64
if obj.GOARCH == "ppc64le" { if obj.GOARCH == "ppc64le" {
...@@ -22,7 +19,6 @@ func Main() { ...@@ -22,7 +19,6 @@ func Main() {
gc.Thearch.REGCTXT = ppc64.REGCTXT gc.Thearch.REGCTXT = ppc64.REGCTXT
gc.Thearch.MAXWIDTH = 1 << 50 gc.Thearch.MAXWIDTH = 1 << 50
gc.Thearch.Betypeinit = betypeinit
gc.Thearch.Defframe = defframe gc.Thearch.Defframe = defframe
gc.Thearch.Proginfo = proginfo gc.Thearch.Proginfo = proginfo
......
...@@ -9,16 +9,12 @@ import ( ...@@ -9,16 +9,12 @@ import (
"cmd/internal/obj/s390x" "cmd/internal/obj/s390x"
) )
func betypeinit() {
}
func Main() { func Main() {
gc.Thearch.LinkArch = &s390x.Links390x gc.Thearch.LinkArch = &s390x.Links390x
gc.Thearch.REGSP = s390x.REGSP gc.Thearch.REGSP = s390x.REGSP
gc.Thearch.REGCTXT = s390x.REGCTXT gc.Thearch.REGCTXT = s390x.REGCTXT
gc.Thearch.MAXWIDTH = 1 << 50 gc.Thearch.MAXWIDTH = 1 << 50
gc.Thearch.Betypeinit = betypeinit
gc.Thearch.Defframe = defframe gc.Thearch.Defframe = defframe
gc.Thearch.Proginfo = proginfo gc.Thearch.Proginfo = proginfo
......
...@@ -12,9 +12,6 @@ import ( ...@@ -12,9 +12,6 @@ import (
"os" "os"
) )
func betypeinit() {
}
func Main() { func Main() {
gc.Thearch.LinkArch = &x86.Link386 gc.Thearch.LinkArch = &x86.Link386
gc.Thearch.REGSP = x86.REGSP gc.Thearch.REGSP = x86.REGSP
...@@ -29,7 +26,6 @@ func Main() { ...@@ -29,7 +26,6 @@ func Main() {
} }
gc.Thearch.MAXWIDTH = (1 << 32) - 1 gc.Thearch.MAXWIDTH = (1 << 32) - 1
gc.Thearch.Betypeinit = betypeinit
gc.Thearch.Defframe = defframe gc.Thearch.Defframe = defframe
gc.Thearch.Proginfo = proginfo gc.Thearch.Proginfo = proginfo
......
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