]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/internal/obj/ppc64: fix mtocrf, cleanup other CR ops
authorPaul E. Murphy <murp@ibm.com>
Thu, 26 Aug 2021 22:14:12 +0000 (17:14 -0500)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Mon, 11 Oct 2021 16:48:22 +0000 (16:48 +0000)
commitaa1c6f56398882fea0969396666004d6ea7ddd57
tree377cb0ce9fda120cfebe3bd5116a13e87c14d3b3
parentbd41f2d3cd82a37e85fcf44067ffd2f728554a3b
cmd/internal/obj/ppc64: fix mtocrf, cleanup other CR ops

Fix "MOVW CRx, Rx" and "MOVFL Rx, constant", The FXM field was not
encoded correctly.

Generate mtocrf instead of mtcrf when a CRx argument is used. This
form is much faster.

Simplify several conditional statements which test if the register
argument is REG_CR or one of REG_CRx if the tested argument is known
to be matched as C_CREG. Likewise, a4 is (the From3 arg) is always
TYPE_NONE in the existing optab entries for type_ 69.

Change-Id: I3a4749b1cbfdfab6a2616586ae59e932e01dae50
Reviewed-on: https://go-review.googlesource.com/c/go/+/352789
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
src/cmd/asm/internal/asm/testdata/ppc64.s
src/cmd/internal/obj/ppc64/asm9.go