]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/riscv: improve register MOVB/MOVH/MOVBU/MOVHU for rva22u64
authorJoel Sing <joel@sing.id.au>
Sat, 9 Dec 2023 08:18:00 +0000 (19:18 +1100)
committerJoel Sing <joel@sing.id.au>
Fri, 22 Mar 2024 04:42:21 +0000 (04:42 +0000)
commita6ecdf29e34ddc82b6ed2315aaedf4c4d522b96c
tree8c1d2eb47fb8059a46dad65adad088e90901c321
parentac0b2f95a5f25e9e331352c93e38f9b29bee9ccc
cmd/internal/obj/riscv: improve register MOVB/MOVH/MOVBU/MOVHU for rva22u64

When GORISCV64 enables rva22u64, use SEXTB for MOVB, SEXTH for MOVH, ZEXTH
for MOVHU and ADDUW for MOVWU. These are single instruction alternatives
to the two instruction shift sequences that are needed otherwise.

Change-Id: Iea5e394f57e238ae8771400a87287c1ee507d44c
Reviewed-on: https://go-review.googlesource.com/c/go/+/572736
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Mark Ryan <markdryan@rivosinc.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: M Zhuo <mengzhuo1203@gmail.com>
src/cmd/asm/internal/asm/testdata/riscv64.s
src/cmd/internal/obj/riscv/obj.go