]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/riscv: implement better bit pattern encoding
authorJoel Sing <joel@sing.id.au>
Tue, 9 Sep 2025 15:16:00 +0000 (01:16 +1000)
committerJoel Sing <joel@sing.id.au>
Thu, 13 Nov 2025 12:15:10 +0000 (04:15 -0800)
commita15d036ce25aa4dd7d2e0aa42ce0cc792cf31a5d
tree59af9b3dcd8625cf67a4f7babe2691259d464ffc
parentabb241a789de9dd6a46ef8bb1f9c741623a4a452
cmd/internal/obj/riscv: implement better bit pattern encoding

Replace the extractBitAndShift function with an encodeBitPattern function.
This allows the caller to specify a slice of bits that are to be extracted
and encoded, rather than making multiple function calls and combining the
results.

Change-Id: I3d51caa10ecf714f2ad2fb66d38376202c4e0628
Reviewed-on: https://go-review.googlesource.com/c/go/+/702397
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Ryan <markdryan@rivosinc.com>
Reviewed-by: Meng Zhuo <mengzhuo1203@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/internal/obj/riscv/obj.go