-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.arch-riscvIssues solely affecting the riscv64 architecture.Issues solely affecting the riscv64 architecture.
Milestone
Description
I am working on #47560 https://go-review.googlesource.com/c/go/+/639656/1 and I notice that go tool objdump seems to not be able to disassemble my instructions properly.
First function of a random binary:
--- /tmp/old 2025-01-03 06:36:17.640800526 +0100
+++ /tmp/new 2025-01-03 06:36:26.500944550 +0100
@@ -2,20 +2,20 @@
type.go:140 0x11000 010db303 MOV 16(X27), X6
type.go:140 0x11004 00236a63 BLTU X6, X2, 5(PC)
type.go:140 0x11008 00a10423 MOVB X10, 8(X2)
- type.go:140 0x1100c 1b45d2ef JAL X5, runtime.morestack_noctxt.abi0(SB)
+ type.go:140 0x1100c 17c592ef JAL X5, runtime.morestack_noctxt.abi0(SB)
type.go:140 0x11010 00814503 MOVBU 8(X2), X10
type.go:140 0x11014 fedff06f JMP internal/abi.Kind.String(SB)
type.go:140 0x11018 fe113423 MOV X1, -24(X2)
type.go:140 0x1101c fe810113 ADDI $-24, X2, X2
type.go:140 0x11020 00113023 MOV X1, (X2)
- type.go:141 0x11024 000f0397 AUIPC $240, X7
+ type.go:141 0x11024 000e0397 AUIPC $224, X7
type.go:141 0x11028 dfc3b383 MOV -516(X7), X7
type.go:141 0x1102c 0ff57413 MOVBU X10, X8
- type.go:141 0x11030 000f0497 AUIPC $240, X9
+ type.go:141 0x11030 000e0497 AUIPC $224, X9
type.go:141 0x11034 df84b483 MOV -520(X9), X9
type.go:141 0x11038 02944063 BLT X8, X9, 8(PC)
type.go:144 0x1103c 00000293 MOV X0, X5
- type.go:144 0x11040 0292fc63 BGEU X5, X9, 14(PC)
+ type.go:144 0x11040 0292fb63 BGEU X5, X9, 13(PC)
type.go:144 0x11044 0003b503 MOV (X7), X10
type.go:144 0x11048 0083b583 MOV 8(X7), X11
type.go:144 0x1104c 00013083 MOV (X2), X1
@@ -23,12 +23,11 @@
type.go:144 0x11054 00008067 RET
type.go:142 0x11058 03851293 SLLI $56, X10, X5
type.go:142 0x1105c 0342d293 SRLI $52, X5, X5
- type.go:142 0x11060 005382b3 ADD X5, X7, X5
+ type.go:142 0x11060 b503929e ADD X7, X5, X5
- type.go:142 0x11064 0002b503 MOV (X5), X10
- type.go:142 0x11068 0082b583 MOV 8(X5), X11
- type.go:142 0x1106c 00013083 MOV (X2), X1
- type.go:142 0x11070 01810113 ADDI $24, X2, X2
- type.go:142 0x11074 00008067 RET
- type.go:144 0x11078 00028313 MOV X5, X6
- type.go:144 0x1107c 34c5d0ef CALL runtime.panicIndex(SB)
- type.go:144 0x11080 00000013 MOV X0, X0
+ type.go:142 0x1106c 01130001 MOV X0, X0
+ type.go:142 0x11064 b5830002 ?
+ type.go:142 0x11068 30830082 ?
+ type.go:142 0x1106c 01130001 MOV X0, X0
+ type.go:142 0x11070 80670181 ?
+ type.go:142 0x11074 83160000 UNIMP
+ type.go:144 0x11078 308590ef CALL runtime.panicIndex(SB)
+ type.go:144 0x1107c 00000001 MOV X0, X0bigwhite
Metadata
Metadata
Assignees
Labels
FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.arch-riscvIssues solely affecting the riscv64 architecture.Issues solely affecting the riscv64 architecture.