]> Cypherpunks repositories - gostls13.git/commit
cmd/asm: fix RLDCR const1,reg,const2,reg on ppc64
authorPaul E. Murphy <murp@ibm.com>
Fri, 16 Apr 2021 20:15:17 +0000 (15:15 -0500)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Thu, 22 Apr 2021 17:02:01 +0000 (17:02 +0000)
commitd4aa72002e76c09f81a8fd82f37781f5126c9cbe
tree28c56d149b7fdab45a3b63ca17e78932aad0c35c
parente8666abd9884f6743f78229ed210bf12a35e7368
cmd/asm: fix RLDCR const1,reg,const2,reg on ppc64

The extended opcode field (XO) is generated incorrectly. OPVCC
assumes an X-form like layout for the XO field. MD-form insns
also have an XO field, but it is both smaller and in a different
bit position.

This hasn't been noticed since const1 == 0 matches as a register
argument instead of a constant, thus it is unlikely anyone has
attempted to assemble this instruction with a non-zero shift
argument.

Likewise, update all other MD-form instructions using OPVCC
to use the new OPMD function.

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