]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/riscv,internal/bytealg: synthesize MIN/MAX/MINU/MAXU instructions
authorJoel Sing <joel@sing.id.au>
Thu, 6 Feb 2025 12:29:57 +0000 (23:29 +1100)
committerJoel Sing <joel@sing.id.au>
Thu, 27 Mar 2025 12:52:28 +0000 (05:52 -0700)
commitd88f93f720692c7a7f3740093afdd51b45c6056f
tree9586d72de8636bdbeb157d9a7cdf1a557b52a2fb
parentd37624881f60f79dfba4ef81661024bee9dfc2d3
cmd/internal/obj/riscv,internal/bytealg: synthesize MIN/MAX/MINU/MAXU instructions

Provide a synthesized version of the MIN/MAX/MINU/MAXU instructions
if they're not natively available. This allows these instructions to
be used in assembly unconditionally.

Use MIN in internal/bytealg.compare.

Cq-Include-Trybots: luci.golang.try:gotip-linux-riscv64
Change-Id: I8a5a3a59f0a9205e136fc3d673b23eaf3ca469f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/653295
Reviewed-by: Mark Ryan <markdryan@rivosinc.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Meng Zhuo <mengzhuo1203@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/asm/internal/asm/testdata/riscv64.s
src/cmd/internal/obj/riscv/asm_test.go
src/cmd/internal/obj/riscv/obj.go
src/cmd/internal/obj/riscv/testdata/testminmax/minmax_test.go [new file with mode: 0644]
src/cmd/internal/obj/riscv/testdata/testminmax/minmax_test.s [new file with mode: 0644]
src/internal/bytealg/compare_riscv64.s