From 03ef105daeff4fef1fd66dbffb8e17d1f779b9ea Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 10 Oct 2019 16:16:54 +0000 Subject: all: remove nacl (part 3, more amd64p32) Part 1: CL 199499 (GOOS nacl) Part 2: CL 200077 (amd64p32 files, toolchain) Part 3: stuff that arguably should've been part of Part 2, but I forgot one of my grep patterns when splitting the original CL up into two parts. This one might also have interesting stuff to resurrect for any future x32 ABI support. Updates #30439 Change-Id: I2b4143374a253a003666f3c69e776b7e456bdb9c Reviewed-on: https://go-review.googlesource.com/c/go/+/200318 Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- src/cmd/internal/obj/x86/obj6.go | 10 ---------- src/cmd/internal/objfile/disasm.go | 30 ++++++++++++++---------------- src/cmd/internal/sys/arch.go | 13 +------------ 3 files changed, 15 insertions(+), 38 deletions(-) (limited to 'src/cmd/internal') diff --git a/src/cmd/internal/obj/x86/obj6.go b/src/cmd/internal/obj/x86/obj6.go index 6716372460..4554d4a525 100644 --- a/src/cmd/internal/obj/x86/obj6.go +++ b/src/cmd/internal/obj/x86/obj6.go @@ -1226,16 +1226,6 @@ var Linkamd64 = obj.LinkArch{ DWARFRegisters: AMD64DWARFRegisters, } -var Linkamd64p32 = obj.LinkArch{ - Arch: sys.ArchAMD64P32, - Init: instinit, - Preprocess: preprocess, - Assemble: span6, - Progedit: progedit, - UnaryDst: unaryDst, - DWARFRegisters: AMD64DWARFRegisters, -} - var Link386 = obj.LinkArch{ Arch: sys.Arch386, Init: instinit, diff --git a/src/cmd/internal/objfile/disasm.go b/src/cmd/internal/objfile/disasm.go index 50fc51be87..b979a7f8aa 100644 --- a/src/cmd/internal/objfile/disasm.go +++ b/src/cmd/internal/objfile/disasm.go @@ -241,7 +241,7 @@ func (d *Disasm) Print(w io.Writer, filter *regexp.Regexp, start, end uint64, pr fmt.Fprintf(tw, " %s:%d\t%#x\t", base(file), line, pc) } - if size%4 != 0 || d.goarch == "386" || d.goarch == "amd64" || d.goarch == "amd64p32" { + if size%4 != 0 || d.goarch == "386" || d.goarch == "amd64" { // Print instruction as bytes. fmt.Fprintf(tw, "%x", code[i:i+size]) } else { @@ -367,24 +367,22 @@ func disasm_ppc64(code []byte, pc uint64, lookup lookupFunc, byteOrder binary.By } var disasms = map[string]disasmFunc{ - "386": disasm_386, - "amd64": disasm_amd64, - "amd64p32": disasm_amd64, - "arm": disasm_arm, - "arm64": disasm_arm64, - "ppc64": disasm_ppc64, - "ppc64le": disasm_ppc64, + "386": disasm_386, + "amd64": disasm_amd64, + "arm": disasm_arm, + "arm64": disasm_arm64, + "ppc64": disasm_ppc64, + "ppc64le": disasm_ppc64, } var byteOrders = map[string]binary.ByteOrder{ - "386": binary.LittleEndian, - "amd64": binary.LittleEndian, - "amd64p32": binary.LittleEndian, - "arm": binary.LittleEndian, - "arm64": binary.LittleEndian, - "ppc64": binary.BigEndian, - "ppc64le": binary.LittleEndian, - "s390x": binary.BigEndian, + "386": binary.LittleEndian, + "amd64": binary.LittleEndian, + "arm": binary.LittleEndian, + "arm64": binary.LittleEndian, + "ppc64": binary.BigEndian, + "ppc64le": binary.LittleEndian, + "s390x": binary.BigEndian, } type Liner interface { diff --git a/src/cmd/internal/sys/arch.go b/src/cmd/internal/sys/arch.go index 2e07482c1a..e8687363de 100644 --- a/src/cmd/internal/sys/arch.go +++ b/src/cmd/internal/sys/arch.go @@ -7,8 +7,7 @@ package sys import "encoding/binary" // ArchFamily represents a family of one or more related architectures. -// For example, amd64 and amd64p32 are both members of the AMD64 family, -// and ppc64 and ppc64le are both members of the PPC64 family. +// For example, ppc64 and ppc64le are both members of the PPC64 family. type ArchFamily byte const ( @@ -72,15 +71,6 @@ var ArchAMD64 = &Arch{ MinLC: 1, } -var ArchAMD64P32 = &Arch{ - Name: "amd64p32", - Family: AMD64, - ByteOrder: binary.LittleEndian, - PtrSize: 4, - RegSize: 8, - MinLC: 1, -} - var ArchARM = &Arch{ Name: "arm", Family: ARM, @@ -183,7 +173,6 @@ var ArchWasm = &Arch{ var Archs = [...]*Arch{ Arch386, ArchAMD64, - ArchAMD64P32, ArchARM, ArchARM64, ArchMIPS, -- cgit v1.3