From 65203e06e61429f0dfc79a406212fa9b99599546 Mon Sep 17 00:00:00 2001 From: Junyang Shao Date: Thu, 9 Apr 2026 21:54:32 +0000 Subject: cmd/asm, cmd/internal/obj/arm64: support memory with imm offset in SVE This CL is generated by CL 765100 This CL supports this addressing pattern: imm(reg.T) Change-Id: I16789e8e6cf03c4fa225c0fe1bd31dc23c9feb21 Reviewed-on: https://go-review.googlesource.com/c/go/+/765080 Reviewed-by: David Chase LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com --- src/cmd/internal/obj/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cmd/internal/obj/util.go') diff --git a/src/cmd/internal/obj/util.go b/src/cmd/internal/obj/util.go index 4349f4d741..fffafeba05 100644 --- a/src/cmd/internal/obj/util.go +++ b/src/cmd/internal/obj/util.go @@ -302,7 +302,7 @@ func writeDconv(w io.Writer, p *Prog, a *Addr, abiDetail bool) { a.writeNameTo(w, abiDetail) case TYPE_MEM: - if buildcfg.GOARCH == "arm64" && (a.Scale < 0 || isZReg(int(a.Reg)) || isZReg(int(a.Index))) { + if buildcfg.GOARCH == "arm64" && (a.Scale < 0 || (a.Index != REG_NONE && (isZReg(int(a.Reg)) || isZReg(int(a.Index))))) { // SVE extended addressing pattern amount := 0 mod := 0 -- cgit v1.3