]> Cypherpunks repositories - gostls13.git/commit
cmd/asm: use single-instruction forms for all loong64 sign and zero extensions
authorXiaolin Zhao <zhaoxiaolin@loongson.cn>
Thu, 7 Nov 2024 02:17:18 +0000 (10:17 +0800)
committerabner chenc <chenguoqi@loongson.cn>
Fri, 8 Nov 2024 01:06:04 +0000 (01:06 +0000)
commit2b33434287be85917ba8edc4a73f0a6ebaaea63e
tree1bb9e0402fdf9cbfcb783275576daa69a803f628
parente6cc9d228a913b871fb20a3fa23021bd5231dbc0
cmd/asm: use single-instruction forms for all loong64 sign and zero extensions

8-bit and 16-bit sign extensions and 32-bit zero extensions were realized
with left and right shifts before this change. We now support assembling
EXTWB, EXTWH and BSTRPICKV, so all three can be done with a single insn
respectively.

This patch is a copy of CL 479496.
Co-authored-by: WANG Xuerui <git@xen0n.name>
Change-Id: Iee5741dd9ebb25746f51008f3f6c86704339d615
Reviewed-on: https://go-review.googlesource.com/c/go/+/626195
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
Reviewed-by: David Chase <drchase@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/internal/obj/loong64/asm.go