aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal
diff options
context:
space:
mode:
authorDave Cheney <dave@cheney.net>2016-04-09 15:04:45 +1000
committerDave Cheney <dave@cheney.net>2016-04-09 06:55:21 +0000
commitbce9747ed00c53e7ddeea102e87aede1b3ec9bd3 (patch)
tree5926f924cd646719e05b213890e6b29dd3fb16b9 /src/cmd/internal
parent93368be61ebaf8069d0d70034097de580441c412 (diff)
downloadgo-bce9747ed00c53e7ddeea102e87aede1b3ec9bd3.tar.xz
cmd: remove unused code
Generated with honnef.co/go/unused There is a large amount of unused code in cmd/internal/obj/s390x but that can wait til the s390x port is merged. There is some unused code in cmd/internal/unvendor/golang.org/x/arch/arm/armasm but that should be addressed upstream and a new revision imported. Change-Id: I252c0f9ea8c5bb1a0b530a374ef13a0a20ea56aa Reviewed-on: https://go-review.googlesource.com/21782 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Dave Cheney <dave@cheney.net>
Diffstat (limited to 'src/cmd/internal')
-rw-r--r--src/cmd/internal/goobj/read.go7
-rw-r--r--src/cmd/internal/obj/mips/asm0.go4
-rw-r--r--src/cmd/internal/obj/x86/asm6.go5
-rw-r--r--src/cmd/internal/obj/x86/obj6_test.go1
-rw-r--r--src/cmd/internal/objfile/pe.go2
5 files changed, 2 insertions, 17 deletions
diff --git a/src/cmd/internal/goobj/read.go b/src/cmd/internal/goobj/read.go
index 5434661384..698d58efe0 100644
--- a/src/cmd/internal/goobj/read.go
+++ b/src/cmd/internal/goobj/read.go
@@ -229,11 +229,8 @@ var (
errCorruptArchive = errors.New("corrupt archive")
errTruncatedArchive = errors.New("truncated archive")
- errNotArchive = errors.New("unrecognized archive format")
-
- errCorruptObject = errors.New("corrupt object file")
- errTruncatedObject = errors.New("truncated object file")
- errNotObject = errors.New("unrecognized object file format")
+ errCorruptObject = errors.New("corrupt object file")
+ errNotObject = errors.New("unrecognized object file format")
)
// An objReader is an object file reader.
diff --git a/src/cmd/internal/obj/mips/asm0.go b/src/cmd/internal/obj/mips/asm0.go
index 521cb66dec..5cb5d1cfd9 100644
--- a/src/cmd/internal/obj/mips/asm0.go
+++ b/src/cmd/internal/obj/mips/asm0.go
@@ -974,10 +974,6 @@ func OP_JMP(op uint32, i uint32) uint32 {
return op | i&0x3FFFFFF
}
-func oclass(a *obj.Addr) int {
- return int(a.Class) - 1
-}
-
func asmout(ctxt *obj.Link, p *obj.Prog, o *Optab, out []uint32) {
o1 := uint32(0)
o2 := uint32(0)
diff --git a/src/cmd/internal/obj/x86/asm6.go b/src/cmd/internal/obj/x86/asm6.go
index b940094b8b..c15b59b5e8 100644
--- a/src/cmd/internal/obj/x86/asm6.go
+++ b/src/cmd/internal/obj/x86/asm6.go
@@ -884,11 +884,6 @@ var yvex_vpbroadcast = []ytab{
{Yxm, Ynone, Yyr, Zvex_rm_v_r, 2},
}
-var yvex_xxmyxm = []ytab{
- {Yxr, Ynone, Yxm, Zvex_r_v_rm, 2},
- {Yyr, Ynone, Yxm, Zvex_r_v_rm, 2},
-}
-
var ymmxmm0f38 = []ytab{
{Ymm, Ynone, Ymr, Zlitm_r, 3},
{Yxm, Ynone, Yxr, Zlitm_r, 5},
diff --git a/src/cmd/internal/obj/x86/obj6_test.go b/src/cmd/internal/obj/x86/obj6_test.go
index a5c80cea3b..fe1f95cc0d 100644
--- a/src/cmd/internal/obj/x86/obj6_test.go
+++ b/src/cmd/internal/obj/x86/obj6_test.go
@@ -76,7 +76,6 @@ func parseTestData(t *testing.T) *ParsedTestData {
}
var spaces_re *regexp.Regexp = regexp.MustCompile("\\s+")
-var marker_re *regexp.Regexp = regexp.MustCompile("MOVQ \\$([0-9]+), AX")
func normalize(s string) string {
return spaces_re.ReplaceAllLiteralString(strings.TrimSpace(s), " ")
diff --git a/src/cmd/internal/objfile/pe.go b/src/cmd/internal/objfile/pe.go
index 1b319941ac..c024762371 100644
--- a/src/cmd/internal/objfile/pe.go
+++ b/src/cmd/internal/objfile/pe.go
@@ -69,8 +69,6 @@ func (f *peFile) symbols() ([]Sym, error) {
text = 0x20
data = 0x40
bss = 0x80
- permX = 0x20000000
- permR = 0x40000000
permW = 0x80000000
)
ch := sect.Characteristics