all: go fmt ./...
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).
Not strictly necessary but will avoid spurious changes
as files are edited.
Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild
Change-Id: I4580f638ce5c885f9e90af4ae9284b62419912a5
Reviewed-on: https://go-review.googlesource.com/c/arch/+/294416
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
diff --git a/arm/armmap/map.go b/arm/armmap/map.go
index 9b4c85a..f505305 100644
--- a/arm/armmap/map.go
+++ b/arm/armmap/map.go
@@ -524,14 +524,14 @@
"FPSCR": "arg_FPSCR",
// VFP floating point registers
- "<Sd>|Vd:4@12|D@22": "arg_Sd",
- "<Sd,Dd>|Vd:4@12|D@22|sz@8": "arg_Sd_Dd",
- "<Dd,Sd>|Vd:4@12|D@22|sz@8": "arg_Dd_Sd",
- "<Sn>|Vn:4@16|N@7": "arg_Sn",
- "<Sn,Dn>|Vn:4@16|N@7|sz@8": "arg_Sn_Dn",
- "<Sm>|Vm:4@0|M@5": "arg_Sm",
- "<Sm,Dm>|Vm:4@0|M@5|sz@8": "arg_Sm_Dm",
- "#0.0": "arg_fp_0",
+ "<Sd>|Vd:4@12|D@22": "arg_Sd",
+ "<Sd,Dd>|Vd:4@12|D@22|sz@8": "arg_Sd_Dd",
+ "<Dd,Sd>|Vd:4@12|D@22|sz@8": "arg_Dd_Sd",
+ "<Sn>|Vn:4@16|N@7": "arg_Sn",
+ "<Sn,Dn>|Vn:4@16|N@7|sz@8": "arg_Sn_Dn",
+ "<Sm>|Vm:4@0|M@5": "arg_Sm",
+ "<Sm,Dm>|Vm:4@0|M@5|sz@8": "arg_Sm_Dm",
+ "#0.0": "arg_fp_0",
"#<imm_vfp>|imm4H:4@16|imm4L:4@0|sz@8": "arg_imm_vfp",
"#<fbits>|sx@7|imm4:4@0|i@5": "arg_fbits",
"<Dn[x]>|N@7|Vn:4@16|opc1@21": "arg_Dn_half",
diff --git a/arm/armspec/spec.go b/arm/armspec/spec.go
index 274f0e0..f5bad80 100644
--- a/arm/armspec/spec.go
+++ b/arm/armspec/spec.go
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build go1.6 && (!386 || go1.8)
// +build go1.6
// +build !386 go1.8
+
// ... see golang.org/issue/12840
// Armspec reads the ``ARM Architecture Reference Manual''
diff --git a/arm/armspec/specmap.go b/arm/armspec/specmap.go
index cfe29e0..b881082 100644
--- a/arm/armspec/specmap.go
+++ b/arm/armspec/specmap.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build ignore
// +build ignore
package main
diff --git a/arm64/arm64spec/spec.go b/arm64/arm64spec/spec.go
index 1000d01..08b487c 100644
--- a/arm64/arm64spec/spec.go
+++ b/arm64/arm64spec/spec.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (go1.6 && amd64) || go1.8
// +build go1.6,amd64 go1.8
// arm64spec reads the ``ARMv8-A Reference Manual''
diff --git a/ppc64/ppc64spec/spec.go b/ppc64/ppc64spec/spec.go
index f8abf46..54e0535 100644
--- a/ppc64/ppc64spec/spec.go
+++ b/ppc64/ppc64spec/spec.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (go1.6 && amd64) || go1.8
// +build go1.6,amd64 go1.8
// Power64spec reads the ``Power ISA V2.07'' Manual
diff --git a/x86/x86asm/plan9x_test.go b/x86/x86asm/plan9x_test.go
index f2ea28c..3bf5144 100644
--- a/x86/x86asm/plan9x_test.go
+++ b/x86/x86asm/plan9x_test.go
@@ -30,7 +30,9 @@
func TestPlan964REXTestdata(t *testing.T) {
testPlan964(t, filter(concat3(basicPrefixes, rexPrefixes, testdataCases(t)), isValidREX))
}
-func TestPlan964REXModRM(t *testing.T) { testPlan964(t, concat3(basicPrefixes, rexPrefixes, enumModRM)) }
+func TestPlan964REXModRM(t *testing.T) {
+ testPlan964(t, concat3(basicPrefixes, rexPrefixes, enumModRM))
+}
func TestPlan964REXOneByte(t *testing.T) { testBasicREX(t, testPlan964) }
func TestPlan964REX0F(t *testing.T) { testBasicREX(t, testPlan964, 0x0F) }
func TestPlan964REX0F38(t *testing.T) { testBasicREX(t, testPlan964, 0x0F, 0x38) }