Skip to content

Commit eb29beb

Browse files
srinivas-pokalacherrymui
authored andcommitted
cmd/objdump: add s390x plan9 disasm support
This CL provides vendor support for s390x disassembler plan9 syntax. cd $GOROOT/src/cmd go get golang.org/x/arch@master go mod tidy go mod vendor For #15255 Change-Id: I20c87510a1aee2d1cf2df58feb535974c4c0e3ef Reviewed-on: https://go-review.googlesource.com/c/go/+/623075 Reviewed-by: David Chase <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Vishwanatha HD <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
1 parent 2349357 commit eb29beb

File tree

10 files changed

+1437
-123
lines changed

10 files changed

+1437
-123
lines changed

src/cmd/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.24
44

55
require (
66
github.com/google/pprof v0.0.0-20240722153945-304e4f0156b8
7-
golang.org/x/arch v0.10.1-0.20240910142527-7874f23b9c06
7+
golang.org/x/arch v0.11.1-0.20241106162200-f977c2e4e3f4
88
golang.org/x/build v0.0.0-20240722200705-b9910f320300
99
golang.org/x/mod v0.20.0
1010
golang.org/x/sync v0.8.0

src/cmd/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20240312041847-bd984b5ce465 h1:KwWnWVW
66
github.com/ianlancetaylor/demangle v0.0.0-20240312041847-bd984b5ce465/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw=
77
github.com/yuin/goldmark v1.6.0 h1:boZcn2GTjpsynOsC0iJHnBWa4Bi0qzfJjthwauItG68=
88
github.com/yuin/goldmark v1.6.0/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
9-
golang.org/x/arch v0.10.1-0.20240910142527-7874f23b9c06 h1:UQRD9d43XiTfPsm0o04gmvWqcLLGkwqV+bOwtb7AP6c=
10-
golang.org/x/arch v0.10.1-0.20240910142527-7874f23b9c06/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
9+
golang.org/x/arch v0.11.1-0.20241106162200-f977c2e4e3f4 h1:B9d6SEXeIaY1QC4c7Gsf88ratIIcxShKAlz60Urrqzw=
10+
golang.org/x/arch v0.11.1-0.20241106162200-f977c2e4e3f4/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
1111
golang.org/x/build v0.0.0-20240722200705-b9910f320300 h1:2Cqg4LnvfD2ZpG8+6KbyYUkweWhNS3SgfcN/eeVseJ0=
1212
golang.org/x/build v0.0.0-20240722200705-b9910f320300/go.mod h1:YsGhg4JUVUWLzdqU2wCrtpRrOveOql6w56FLDHq/CJ4=
1313
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=

src/cmd/internal/objfile/disasm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,9 @@ func disasm_s390x(code []byte, pc uint64, lookup lookupFunc, _ binary.ByteOrder,
421421
text = "?"
422422
} else {
423423
if gnuAsm {
424-
text = fmt.Sprintf("%s", s390xasm.GNUSyntax(inst, pc))
424+
text = fmt.Sprintf("%-36s // %s", s390xasm.GoSyntax(inst, pc, lookup), s390xasm.GNUSyntax(inst, pc))
425425
} else {
426-
text = fmt.Sprintf("%s", "Go/plan9 syntax unsupported..!!")
426+
text = s390xasm.GoSyntax(inst, pc, lookup)
427427
}
428428
}
429429
return text, size

src/cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/decode.go

Lines changed: 48 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cmd/vendor/golang.org/x/arch/s390x/s390xasm/field.go

Lines changed: 0 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cmd/vendor/golang.org/x/arch/s390x/s390xasm/gnu.go

Lines changed: 15 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cmd/vendor/golang.org/x/arch/s390x/s390xasm/inst.go

Lines changed: 48 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)