]> git.feebdaed.xyz Git - 0xmirror/go.git/commit
cmd/internal/obj/loong64: add aliases to 32-bit arithmetic instructions
authorXiaolin Zhao <zhaoxiaolin@loongson.cn>
Tue, 18 Nov 2025 08:00:35 +0000 (16:00 +0800)
committerGopher Robot <gobot@golang.org>
Wed, 26 Nov 2025 18:40:20 +0000 (10:40 -0800)
commitc0f02c11fff439cf3a99dfca34698b583bb3ce48
treee3708853fd1f265b91c52ef1f281b95770878271
parent37ce4adcd45febab8b5da1fe5ce609f1f6673894
cmd/internal/obj/loong64: add aliases to 32-bit arithmetic instructions

Both the MULW and MUL instructions point to the mul.w instruction
in the loong64 ISA. Previously, MULW was not encoded; now it is
encoded and used as an alias for MUL.
The same applies to the following instructions: ADD, SUB, DIV.
For consistency, we have added additional aliases for DIVU, REM and REMU.

Change-Id: Iba201a3c4c2893ff7d301ef877fad9c81e54291b
Reviewed-on: https://go-review.googlesource.com/c/go/+/721523
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: abner chenc <chenguoqi@loongson.cn>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/asm/internal/asm/testdata/loong64enc1.s
src/cmd/asm/internal/asm/testdata/loong64enc2.s
src/cmd/asm/internal/asm/testdata/loong64enc3.s
src/cmd/internal/obj/loong64/a.out.go
src/cmd/internal/obj/loong64/anames.go
src/cmd/internal/obj/loong64/asm.go