aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-03-30 15:11:52 -0400
committerCherry Zhang <cherryyz@google.com>2020-03-30 21:37:12 +0000
commit16237b22a85b2b20bb7915d3c64a7a2e071623ea (patch)
tree1e21acacbd72ae6bb66203abc93930e46af9f2c5
parent14ad23d1f599199f89ba32cc4bc20049277ce9c1 (diff)
downloadgo-16237b22a85b2b20bb7915d3c64a7a2e071623ea.tar.gz
go-16237b22a85b2b20bb7915d3c64a7a2e071623ea.zip
cmd/objdump: test disassembly on ARM and ARM64
We support disassembly on both ARM and ARM64. Tests are only enabled on one or the other. This CL enables both. Change-Id: If89d78b975c241c2b14f72b714dcdc771b4b382c Reviewed-on: https://go-review.googlesource.com/c/go/+/226459 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-rw-r--r--src/cmd/objdump/objdump_test.go18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/cmd/objdump/objdump_test.go b/src/cmd/objdump/objdump_test.go
index 5030ec65d2..c974d6707b 100644
--- a/src/cmd/objdump/objdump_test.go
+++ b/src/cmd/objdump/objdump_test.go
@@ -58,7 +58,7 @@ func buildObjdump() error {
return nil
}
-var x86Need = []string{
+var x86Need = []string{ // for both 386 and AMD64
"JMP main.main(SB)",
"CALL main.Println(SB)",
"RET",
@@ -82,7 +82,13 @@ var armNeed = []string{
"RET",
}
-var arm64GnuNeed = []string{
+var arm64Need = []string{
+ "JMP main.main(SB)",
+ "CALL main.Println(SB)",
+ "RET",
+}
+
+var armGnuNeed = []string{ // for both ARM and AMR64
"ldr",
"bl",
"cmp",
@@ -153,6 +159,8 @@ func testDisasm(t *testing.T, printCode bool, printGnuAsm bool, flags ...string)
need = append(need, x86Need...)
case "arm":
need = append(need, armNeed...)
+ case "arm64":
+ need = append(need, arm64Need...)
case "ppc64", "ppc64le":
need = append(need, ppcNeed...)
}
@@ -163,8 +171,8 @@ func testDisasm(t *testing.T, printCode bool, printGnuAsm bool, flags ...string)
need = append(need, amd64GnuNeed...)
case "386":
need = append(need, i386GnuNeed...)
- case "arm64":
- need = append(need, arm64GnuNeed...)
+ case "arm", "arm64":
+ need = append(need, armGnuNeed...)
case "ppc64", "ppc64le":
need = append(need, ppcGnuNeed...)
}
@@ -234,8 +242,6 @@ func TestDisasmGnuAsm(t *testing.T) {
switch runtime.GOARCH {
case "mips", "mipsle", "mips64", "mips64le", "riscv64", "s390x":
t.Skipf("skipping on %s, issue 19160", runtime.GOARCH)
- case "arm":
- t.Skipf("skipping gnuAsm test on %s", runtime.GOARCH)
}
testDisasm(t, false, true)
}