Skip to content
Snippets Groups Projects
Commit 16237b22 authored by Cherry Zhang's avatar Cherry Zhang
Browse files

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: default avatarDavid Chase <drchase@google.com>
parent 14ad23d1
No related branches found
No related tags found
No related merge requests found
......@@ -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)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment