Commit ce469fad authored by Matthew Dempsky's avatar Matthew Dempsky

cmd/5g, cmd/internal/ld, cmd/internal/obj: destutter composite literals

While here, this changes DWAbbrev's attr field from a [30]DWAttrForm
with zero-termination to a simple []DWAttrForm, and updates its users
accordingly.

Passes "go build -toolexec 'toolstash -cmp' -a std" on linux/amd64.

Change-Id: I52b5f7a749bdb3e7588fc8ebdb8fee2cf8cab602
Reviewed-on: https://go-review.googlesource.com/8762
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Reviewed-by: default avatarDave Cheney <dave@cheney.net>
parent 985461fd
......@@ -1508,102 +1508,22 @@ var predinfo = []struct {
scond int
notscond int
}{
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABEQ, arm.ABNE, 0x0, 0x1},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABNE, arm.ABEQ, 0x1, 0x0},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABCS, arm.ABCC, 0x2, 0x3},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABHS, arm.ABLO, 0x2, 0x3},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABCC, arm.ABCS, 0x3, 0x2},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABLO, arm.ABHS, 0x3, 0x2},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABMI, arm.ABPL, 0x4, 0x5},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABPL, arm.ABMI, 0x5, 0x4},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABVS, arm.ABVC, 0x6, 0x7},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABVC, arm.ABVS, 0x7, 0x6},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABHI, arm.ABLS, 0x8, 0x9},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABLS, arm.ABHI, 0x9, 0x8},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABGE, arm.ABLT, 0xA, 0xB},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABLT, arm.ABGE, 0xB, 0xA},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABGT, arm.ABLE, 0xC, 0xD},
struct {
opcode int
notopcode int
scond int
notscond int
}{arm.ABLE, arm.ABGT, 0xD, 0xC},
{arm.ABEQ, arm.ABNE, 0x0, 0x1},
{arm.ABNE, arm.ABEQ, 0x1, 0x0},
{arm.ABCS, arm.ABCC, 0x2, 0x3},
{arm.ABHS, arm.ABLO, 0x2, 0x3},
{arm.ABCC, arm.ABCS, 0x3, 0x2},
{arm.ABLO, arm.ABHS, 0x3, 0x2},
{arm.ABMI, arm.ABPL, 0x4, 0x5},
{arm.ABPL, arm.ABMI, 0x5, 0x4},
{arm.ABVS, arm.ABVC, 0x6, 0x7},
{arm.ABVC, arm.ABVS, 0x7, 0x6},
{arm.ABHI, arm.ABLS, 0x8, 0x9},
{arm.ABLS, arm.ABHI, 0x9, 0x8},
{arm.ABGE, arm.ABLT, 0xA, 0xB},
{arm.ABLT, arm.ABGE, 0xB, 0xA},
{arm.ABGT, arm.ABLE, 0xC, 0xD},
{arm.ABLE, arm.ABGT, 0xD, 0xC},
}
type Joininfo struct {
......
This diff is collapsed.
......@@ -25,14 +25,8 @@ var exper = []struct {
name string
val *int
}{
struct {
name string
val *int
}{"fieldtrack", &Fieldtrack_enabled},
struct {
name string
val *int
}{"framepointer", &Framepointer_enabled},
{"fieldtrack", &Fieldtrack_enabled},
{"framepointer", &Framepointer_enabled},
}
func addexp(s string) {
......
......@@ -47,58 +47,19 @@ var headers = []struct {
name string
val int
}{
struct {
name string
val int
}{"darwin", Hdarwin},
struct {
name string
val int
}{"dragonfly", Hdragonfly},
struct {
name string
val int
}{"elf", Helf},
struct {
name string
val int
}{"freebsd", Hfreebsd},
struct {
name string
val int
}{"linux", Hlinux},
struct {
name string
val int
}{"android", Hlinux}, // must be after "linux" entry or else headstr(Hlinux) == "android"
struct {
name string
val int
}{"nacl", Hnacl},
struct {
name string
val int
}{"netbsd", Hnetbsd},
struct {
name string
val int
}{"openbsd", Hopenbsd},
struct {
name string
val int
}{"plan9", Hplan9},
struct {
name string
val int
}{"solaris", Hsolaris},
struct {
name string
val int
}{"windows", Hwindows},
struct {
name string
val int
}{"windowsgui", Hwindows},
{"darwin", Hdarwin},
{"dragonfly", Hdragonfly},
{"elf", Helf},
{"freebsd", Hfreebsd},
{"linux", Hlinux},
{"android", Hlinux}, // must be after "linux" entry or else headstr(Hlinux) == "android"
{"nacl", Hnacl},
{"netbsd", Hnetbsd},
{"openbsd", Hopenbsd},
{"plan9", Hplan9},
{"solaris", Hsolaris},
{"windows", Hwindows},
{"windowsgui", Hwindows},
}
func headtype(name string) int {
......
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