]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use MOV(D|F) with const for Const(64|32)F on riscv64
authorMeng Zhuo <mengzhuo@iscas.ac.cn>
Fri, 12 Sep 2025 09:45:56 +0000 (17:45 +0800)
committerMeng Zhuo <mengzhuo@iscas.ac.cn>
Mon, 27 Oct 2025 01:35:09 +0000 (18:35 -0700)
commitd7a52f93696477a9858dc09a784b4945d3045983
tree5fc5ed30f243dc9151dd53dabcb55f4b6a2aa326
parent6f04a92be3afa24560dd6149eefb991450746d72
cmd/compile: use MOV(D|F) with const for Const(64|32)F on riscv64

The original Const64F using: AUIPC + LD + FMVDX to load
float64 const, we can use AUIPC + FLD instead, same as Const32F.

Change-Id: I8ca0a0e90d820a26e69b74cd25df3cc662132bf7
Reviewed-on: https://go-review.googlesource.com/c/go/+/703215
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/cmd/compile/internal/riscv64/ssa.go
src/cmd/compile/internal/ssa/_gen/RISCV64.rules
src/cmd/compile/internal/ssa/_gen/RISCV64Ops.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewrite.go
src/cmd/compile/internal/ssa/rewriteRISCV64.go
test/codegen/floats.go