]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/ppc64: fix wrong register encoding in XX1-Form instructions
authorCarlos Eduardo Seo <cseo@linux.vnet.ibm.com>
Thu, 31 Jan 2019 17:22:21 +0000 (11:22 -0600)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Thu, 14 Mar 2019 12:46:18 +0000 (12:46 +0000)
commit259de39375d39a1ba32de640cde5d112b7b80acf
tree5a02b9b289f8cb4375f2db61f449445c319d6f57
parent1f90d081391d4f5911960fd28d81d7ea5e554a8f
cmd/internal/obj/ppc64: fix wrong register encoding in XX1-Form instructions

A bug in the encoding of XX1-Form is flipping bit 31 of such instructions.
This may result in register clobering when using VSX instructions.

This was not exposed before because we currently don't generate these
instructions in SSA, and the asm files in which they are present aren't
affected by register clobbering.

This change fixes the bug and adds a testcase for the problem.

Fixes #30112

Change-Id: I77b606159ae1efea33d2ba3e1c74b7fae8d5d2e7
Reviewed-on: https://go-review.googlesource.com/c/go/+/163759
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/asm/internal/asm/testdata/ppc64.s
src/cmd/internal/obj/ppc64/asm9.go