]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use a single const MOV operand for riscv64
authorJoel Sing <joel@sing.id.au>
Wed, 17 Mar 2021 16:37:58 +0000 (03:37 +1100)
committerJoel Sing <joel@sing.id.au>
Thu, 18 Mar 2021 03:42:56 +0000 (03:42 +0000)
commit65178441297002592a65d4f92c1dc97994ac7d24
tree2198610faebb874398ee2fcb67e87f3c051e3eab
parentf5e6d3e879f487066d1a05b8000a7187247558f7
cmd/compile: use a single const MOV operand for riscv64

Most platforms only use a single MOV const operand - remove the MOV{B,H,W}const
operands from riscv64 and consistently use MOVDconst instead. The implementation
of all four is the same and there is no benefit gained from having multiple const
operands (in fact it requires a lot more rewrite rules).

Change-Id: I0ba7d7554e371a1de762ef5f3745e9c0c30d41ac
Reviewed-on: https://go-review.googlesource.com/c/go/+/302610
Trust: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Michael Munday <mike.munday@lowrisc.org>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
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/rewriteRISCV64.go