]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/internal/obj: consolidate AMOVW and AMOVWZ optab entries
authorPaul E. Murphy <murp@ibm.com>
Tue, 9 Mar 2021 22:55:11 +0000 (16:55 -0600)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Thu, 15 Apr 2021 18:21:15 +0000 (18:21 +0000)
commitddd8d7c0a6859114f1f9bfbb3c56fb63f870badc
tree044ea6ef4c712a5c15ab689da98908ed42bd067d
parent8009a81f7a44235001ce373fbc39391a894c86df
cmd/internal/obj: consolidate AMOVW and AMOVWZ optab entries

This requires consolidating the register move operations into a
single case entry in asmout.  These moves are also used to
sign/zero-extend register values.

Combine the three asmout cases for register moves.  This allows
AMOVWZ and AMOVW to be handled with the same optab entries.

Likewise, remove the diagnostic error for non-zero constant
loads into R0 using the register move operations, it is not
possible to match this asmout case with a non-zero constant.

Finally, fix the load constant 0 via "MOV[BHW]{,Z} $0, Rx".
These now generate "li Rx, $0" instead of a zero/sign-extend
of the contents of R0.

Change-Id: Ia4a263661582f10feda27ee21cb121e05ea931dc
Reviewed-on: https://go-review.googlesource.com/c/go/+/308190
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Carlos Eduardo Seo <carlos.seo@linaro.org>
Trust: Carlos Eduardo Seo <carlos.seo@linaro.org>
src/cmd/asm/internal/asm/testdata/ppc64.s
src/cmd/internal/obj/ppc64/asm9.go