mirror of
https://github.com/golang/go
synced 2024-11-18 09:54:57 -07:00
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: Dave Cheney <dave@cheney.net>
This commit is contained in:
parent
1f2930cb5c
commit
544010a05a
@ -10,26 +10,18 @@ import (
|
||||
"cmd/internal/obj/x86"
|
||||
)
|
||||
|
||||
var (
|
||||
leaptr = x86.ALEAQ
|
||||
)
|
||||
|
||||
func betypeinit() {
|
||||
if obj.GOARCH == "amd64p32" {
|
||||
leaptr = x86.ALEAL
|
||||
}
|
||||
}
|
||||
var leaptr = x86.ALEAQ
|
||||
|
||||
func Main() {
|
||||
gc.Thearch.LinkArch = &x86.Linkamd64
|
||||
if obj.GOARCH == "amd64p32" {
|
||||
gc.Thearch.LinkArch = &x86.Linkamd64p32
|
||||
leaptr = x86.ALEAL
|
||||
}
|
||||
gc.Thearch.REGSP = x86.REGSP
|
||||
gc.Thearch.REGCTXT = x86.REGCTXT
|
||||
gc.Thearch.MAXWIDTH = 1 << 50
|
||||
|
||||
gc.Thearch.Betypeinit = betypeinit
|
||||
gc.Thearch.Defframe = defframe
|
||||
gc.Thearch.Proginfo = proginfo
|
||||
|
||||
|
@ -10,16 +10,12 @@ import (
|
||||
"cmd/internal/obj/arm"
|
||||
)
|
||||
|
||||
func betypeinit() {
|
||||
}
|
||||
|
||||
func Main() {
|
||||
gc.Thearch.LinkArch = &arm.Linkarm
|
||||
gc.Thearch.REGSP = arm.REGSP
|
||||
gc.Thearch.REGCTXT = arm.REGCTXT
|
||||
gc.Thearch.MAXWIDTH = (1 << 32) - 1
|
||||
|
||||
gc.Thearch.Betypeinit = betypeinit
|
||||
gc.Thearch.Defframe = defframe
|
||||
gc.Thearch.Proginfo = proginfo
|
||||
|
||||
|
@ -10,16 +10,12 @@ import (
|
||||
"cmd/internal/obj/arm64"
|
||||
)
|
||||
|
||||
func betypeinit() {
|
||||
}
|
||||
|
||||
func Main() {
|
||||
gc.Thearch.LinkArch = &arm64.Linkarm64
|
||||
gc.Thearch.REGSP = arm64.REGSP
|
||||
gc.Thearch.REGCTXT = arm64.REGCTXT
|
||||
gc.Thearch.MAXWIDTH = 1 << 50
|
||||
|
||||
gc.Thearch.Betypeinit = betypeinit
|
||||
gc.Thearch.Defframe = defframe
|
||||
gc.Thearch.Proginfo = proginfo
|
||||
|
||||
|
@ -359,10 +359,9 @@ type Arch struct {
|
||||
REGCTXT int
|
||||
MAXWIDTH int64
|
||||
|
||||
Betypeinit func()
|
||||
Defframe func(*obj.Prog)
|
||||
Proginfo func(*obj.Prog) // fills in Prog.Info
|
||||
Use387 bool // should 8g use 387 FP instructions instead of sse2.
|
||||
Defframe func(*obj.Prog)
|
||||
Proginfo func(*obj.Prog) // fills in Prog.Info
|
||||
Use387 bool // should 8g use 387 FP instructions instead of sse2.
|
||||
|
||||
// SSARegToReg maps ssa register numbers to obj register numbers.
|
||||
SSARegToReg []int16
|
||||
|
@ -291,7 +291,6 @@ func Main() {
|
||||
Debug['l'] = 1 - Debug['l']
|
||||
}
|
||||
|
||||
Thearch.Betypeinit()
|
||||
Widthint = Thearch.LinkArch.IntSize
|
||||
Widthptr = Thearch.LinkArch.PtrSize
|
||||
Widthreg = Thearch.LinkArch.RegSize
|
||||
|
@ -11,9 +11,6 @@ import (
|
||||
"cmd/internal/obj/mips"
|
||||
)
|
||||
|
||||
func betypeinit() {
|
||||
}
|
||||
|
||||
func Main() {
|
||||
gc.Thearch.LinkArch = &mips.Linkmips64
|
||||
if obj.GOARCH == "mips64le" {
|
||||
@ -23,7 +20,6 @@ func Main() {
|
||||
gc.Thearch.REGCTXT = mips.REGCTXT
|
||||
gc.Thearch.MAXWIDTH = 1 << 50
|
||||
|
||||
gc.Thearch.Betypeinit = betypeinit
|
||||
gc.Thearch.Defframe = defframe
|
||||
gc.Thearch.Proginfo = proginfo
|
||||
|
||||
|
@ -10,9 +10,6 @@ import (
|
||||
"cmd/internal/obj/ppc64"
|
||||
)
|
||||
|
||||
func betypeinit() {
|
||||
}
|
||||
|
||||
func Main() {
|
||||
gc.Thearch.LinkArch = &ppc64.Linkppc64
|
||||
if obj.GOARCH == "ppc64le" {
|
||||
@ -22,7 +19,6 @@ func Main() {
|
||||
gc.Thearch.REGCTXT = ppc64.REGCTXT
|
||||
gc.Thearch.MAXWIDTH = 1 << 50
|
||||
|
||||
gc.Thearch.Betypeinit = betypeinit
|
||||
gc.Thearch.Defframe = defframe
|
||||
gc.Thearch.Proginfo = proginfo
|
||||
|
||||
|
@ -9,16 +9,12 @@ import (
|
||||
"cmd/internal/obj/s390x"
|
||||
)
|
||||
|
||||
func betypeinit() {
|
||||
}
|
||||
|
||||
func Main() {
|
||||
gc.Thearch.LinkArch = &s390x.Links390x
|
||||
gc.Thearch.REGSP = s390x.REGSP
|
||||
gc.Thearch.REGCTXT = s390x.REGCTXT
|
||||
gc.Thearch.MAXWIDTH = 1 << 50
|
||||
|
||||
gc.Thearch.Betypeinit = betypeinit
|
||||
gc.Thearch.Defframe = defframe
|
||||
gc.Thearch.Proginfo = proginfo
|
||||
|
||||
|
@ -12,9 +12,6 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
func betypeinit() {
|
||||
}
|
||||
|
||||
func Main() {
|
||||
gc.Thearch.LinkArch = &x86.Link386
|
||||
gc.Thearch.REGSP = x86.REGSP
|
||||
@ -29,7 +26,6 @@ func Main() {
|
||||
}
|
||||
gc.Thearch.MAXWIDTH = (1 << 32) - 1
|
||||
|
||||
gc.Thearch.Betypeinit = betypeinit
|
||||
gc.Thearch.Defframe = defframe
|
||||
gc.Thearch.Proginfo = proginfo
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user