diff --git a/arm/armspec/spec.go b/arm/armspec/spec.go index 60579a0..5b458e1 100644 --- a/arm/armspec/spec.go +++ b/arm/armspec/spec.go @@ -581,7 +581,14 @@ func findWords(chars []pdf.Text) (words []pdf.Text) { f := ck.Font f = strings.TrimSuffix(f, ",Italic") f = strings.TrimSuffix(f, "-Italic") - words = append(words, pdf.Text{f, ck.FontSize, ck.X, ck.Y, end - ck.X, s}) + words = append(words, pdf.Text{ + Font: f, + FontSize: ck.FontSize, + X: ck.X, + Y: ck.Y, + W: end - ck.X, + S: s, + }) k = l } i = j diff --git a/arm64/arm64spec/spec.go b/arm64/arm64spec/spec.go index ee784e5..feedf83 100644 --- a/arm64/arm64spec/spec.go +++ b/arm64/arm64spec/spec.go @@ -685,7 +685,14 @@ func findWords(chars []pdf.Text) (words []pdf.Text) { f := ck.Font f = strings.TrimSuffix(f, ",Italic") f = strings.TrimSuffix(f, "-Italic") - words = append(words, pdf.Text{f, ck.FontSize, ck.X, ck.Y, end - ck.X, s}) + words = append(words, pdf.Text{ + Font: f, + FontSize: ck.FontSize, + X: ck.X, + Y: ck.Y, + W: end - ck.X, + S: s, + }) k = l } i = j diff --git a/loong64/loong64spec/spec.go b/loong64/loong64spec/spec.go index 3e69a24..177df41 100644 --- a/loong64/loong64spec/spec.go +++ b/loong64/loong64spec/spec.go @@ -358,7 +358,14 @@ func findWords(chars []pdf.Text) (words []pdf.Text) { break } f := ck.Font - words = append(words, pdf.Text{f, ck.FontSize, ck.X, ck.Y, end - ck.X, s}) + words = append(words, pdf.Text{ + Font: f, + FontSize: ck.FontSize, + X: ck.X, + Y: ck.Y, + W: end - ck.X, + S: s, + }) k = l } i = j diff --git a/ppc64/ppc64map/map.go b/ppc64/ppc64map/map.go index 1e3b1b6..4e50843 100644 --- a/ppc64/ppc64map/map.go +++ b/ppc64/ppc64map/map.go @@ -24,7 +24,6 @@ import ( "flag" "fmt" gofmt "go/format" - asm "golang.org/x/arch/ppc64/ppc64asm" "log" "math/bits" "os" @@ -33,6 +32,8 @@ import ( "strconv" "strings" "text/template" + + asm "golang.org/x/arch/ppc64/ppc64asm" ) var format = flag.String("fmt", "text", "output format: text, decoder, asm") @@ -287,7 +288,6 @@ func parseFields(encoding, text string, word int8) Args { if j < 0 { fmt.Fprintf(os.Stderr, "%s: wrong %d-th encoding field: %q\n", text, i, f) panic("Invalid encoding entry.") - continue } k := strings.Index(f[j+1:], " ") if k >= 0 { diff --git a/ppc64/ppc64spec/spec.go b/ppc64/ppc64spec/spec.go index 4167d6d..ad9411f 100644 --- a/ppc64/ppc64spec/spec.go +++ b/ppc64/ppc64spec/spec.go @@ -465,7 +465,14 @@ func findWords(chars []pdf.Text) (words []pdf.Text) { f := ck.Font f = strings.TrimSuffix(f, ",Italic") f = strings.TrimSuffix(f, "-Italic") - words = append(words, pdf.Text{f, ck.FontSize, ck.X, ck.Y, end - ck.X, s}) + words = append(words, pdf.Text{ + Font: f, + FontSize: ck.FontSize, + X: ck.X, + Y: ck.Y, + W: end - ck.X, + S: s, + }) k = l } i = j diff --git a/s390x/s390xmap/map.go b/s390x/s390xmap/map.go index 1adfdfb..3fc89f1 100644 --- a/s390x/s390xmap/map.go +++ b/s390x/s390xmap/map.go @@ -24,12 +24,13 @@ import ( "flag" "fmt" gofmt "go/format" - asm "golang.org/x/arch/s390x/s390xasm" "log" "os" "regexp" "strconv" "strings" + + asm "golang.org/x/arch/s390x/s390xasm" ) var format = flag.String("fmt", "text", "output format: text, decoder, asm") @@ -215,7 +216,6 @@ func parseFields(encoding, text string) Args { if j < 0 { fmt.Fprintf(os.Stderr, "%s: wrong %d-th encoding field: %q\n", text, i, f) panic("Invalid encoding entry.") - continue } off, err = strconv.Atoi(f[j+1:]) if err != nil { diff --git a/s390x/s390xspec/spec.go b/s390x/s390xspec/spec.go index cc0ebad..1b24be8 100644 --- a/s390x/s390xspec/spec.go +++ b/s390x/s390xspec/spec.go @@ -30,10 +30,11 @@ import ( "log" "math" "os" - "rsc.io/pdf" "sort" "strconv" "strings" + + "rsc.io/pdf" ) type Inst struct { @@ -1042,7 +1043,14 @@ func findWords(chars []pdf.Text) (words []pdf.Text) { f := ck.Font f = strings.TrimSuffix(f, ",Italic") f = strings.TrimSuffix(f, "-Italic") - words = append(words, pdf.Text{f, ck.FontSize, ck.X, ck.Y, end - ck.X, s}) + words = append(words, pdf.Text{ + Font: f, + FontSize: ck.FontSize, + X: ck.X, + Y: ck.Y, + W: end - ck.X, + S: s, + }) k = l } i = j diff --git a/x86/x86asm/tables.go b/x86/x86asm/tables.go index 6f57c70..9710bbd 100644 --- a/x86/x86asm/tables.go +++ b/x86/x86asm/tables.go @@ -1,4 +1,4 @@ -// Code generated by x86map -fmt=decoder x86.csv DO NOT EDIT. +// Code generated by x86map -fmt=decoder ../x86.csv DO NOT EDIT. package x86asm diff --git a/x86/x86spec/parse.go b/x86/x86spec/parse.go index e5324be..8a9adc9 100644 --- a/x86/x86spec/parse.go +++ b/x86/x86spec/parse.go @@ -510,7 +510,14 @@ func findWords(chars []pdf.Text) (words []pdf.Text) { f := ck.Font f = strings.TrimSuffix(f, ",Italic") f = strings.TrimSuffix(f, "-Italic") - words = append(words, pdf.Text{f, ck.FontSize, ck.X, ck.Y, end, s}) + words = append(words, pdf.Text{ + Font: f, + FontSize: ck.FontSize, + X: ck.X, + Y: ck.Y, + W: end, + S: s, + }) k = l } i = j