From: Austin Clements Date: Fri, 6 Sep 2024 11:19:18 +0000 (-0400) Subject: cmd/internal/obj: make asmidx error less cryptic X-Git-Tag: go1.24rc1~778 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8c52cd3da550f5315c32bdcb9442ac50e3e4ec96;p=gostls13.git cmd/internal/obj: make asmidx error less cryptic It's still pretty cryptic, but at least now instead of printing asm: asmidx: bad address 0/2067/2068 it will print asm: asmidx: bad address 0/BX/SP Change-Id: I1c73c439c94c5b9d3039728db85102a818739db9 Reviewed-on: https://go-review.googlesource.com/c/go/+/611256 LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Pratt Auto-Submit: Austin Clements --- diff --git a/src/cmd/internal/obj/x86/asm6.go b/src/cmd/internal/obj/x86/asm6.go index dc38069edc..657408439a 100644 --- a/src/cmd/internal/obj/x86/asm6.go +++ b/src/cmd/internal/obj/x86/asm6.go @@ -3506,7 +3506,7 @@ bas: return bad: - ctxt.Diag("asmidx: bad address %d/%d/%d", scale, index, base) + ctxt.Diag("asmidx: bad address %d/%s/%s", scale, rconv(index), rconv(base)) ab.Put1(0) }