]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj: make asmidx error less cryptic
authorAustin Clements <austin@google.com>
Fri, 6 Sep 2024 11:19:18 +0000 (07:19 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 1 Oct 2024 23:32:21 +0000 (23:32 +0000)
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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Austin Clements <austin@google.com>

src/cmd/internal/obj/x86/asm6.go

index dc38069edc8158d1604b69bd088a00132ff2bd2c..657408439af13af79e0ccf3b292df1df10547ced 100644 (file)
@@ -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)
 }