From eb7c67fdc9e17959647a15db9e7781b9d447061a Mon Sep 17 00:00:00 2001 From: Xiaolin Zhao Date: Thu, 11 Sep 2025 16:30:38 +0800 Subject: [PATCH] cmd/internal/obj/loong64: use the MOVVP instruction to optimize prologue MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The MOVVP instruction has a larger offset range, and removes 928 instructions from the go binary on loong64. file before after Δ go 1634208 1634064 -144 gofmt 323324 323240 -84 asm 567870 567778 -92 cgo 487694 487598 -96 compile 2500266 2500142 -124 cover 530590 530498 -92 link 723804 723692 -112 preprofile 240562 240474 -88 vet 819672 819576 -96 Change-Id: Ib0efcb006d3ae3f2bceec0d6e88f3794d5e99831 Reviewed-on: https://go-review.googlesource.com/c/go/+/702715 Reviewed-by: abner chenc Reviewed-by: Mark Freeman Reviewed-by: Meidan Li Reviewed-by: Michael Knyszek LUCI-TryBot-Result: Go LUCI --- src/cmd/internal/obj/loong64/obj.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/internal/obj/loong64/obj.go b/src/cmd/internal/obj/loong64/obj.go index a97217d316..ea110f00cb 100644 --- a/src/cmd/internal/obj/loong64/obj.go +++ b/src/cmd/internal/obj/loong64/obj.go @@ -324,7 +324,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) { q = c.ctxt.StartUnsafePoint(q, c.newprog) q = obj.Appendp(q, newprog) - q.As = mov + q.As = AMOVVP q.Pos = p.Pos q.From.Type = obj.TYPE_REG q.From.Reg = REGLINK -- 2.52.0