Skip to content

loong64: emit Go's XVMOVQ .V4 broadcast load instead of a WORD - #23

Merged
tannevaled merged 1 commit into
mainfrom
fix/loong64-broadcast-mnemonic
Oct 4, 2026
Merged

tannevaled merged 1 commit into
mainfrom
fix/loong64-broadcast-mnemonic

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Go's loong64 assembler does have the broadcast load: it is spelled as an
arrangement, XVMOVQ off(R), X.V4, and assembles to xvldrepl.d (checked with
Go 1.26.4 and 1.27.1: the same word as GNU as). v0.2.5's generator emitted
it through go-asmgen's WORD encoder and its docs said Go lacked it; both
are corrected. The machine code of sum_loong64.s is byte-identical before
and after (compared from go tool asm -S), so the hardware results stand.
Only the fused multiply-add (xvfmadd.d) remains a WORD.

🤖 Generated with Claude Code

Go's loong64 assembler does have the broadcast load: it is spelled as an
arrangement, XVMOVQ off(R), X.V4, and assembles to xvldrepl.d (checked with
Go 1.26.4 and 1.27.1: the same word as GNU as). v0.2.5's generator emitted
it through go-asmgen's WORD encoder and its docs said Go lacked it; both
are corrected. The machine code of sum_loong64.s is byte-identical before
and after (compared from `go tool asm -S`), so the hardware results stand.
Only the fused multiply-add (xvfmadd.d) remains a WORD.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 2c75fb0 into main Oct 4, 2026
12 checks passed
@tannevaled
tannevaled deleted the fix/loong64-broadcast-mnemonic branch October 4, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant