[PPC64] VSX indexed-form loads use wrong instruction format
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Thu, 9 Oct 2014 17:51:35 +0000 (17:51 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Thu, 9 Oct 2014 17:51:35 +0000 (17:51 +0000)
commitc307b3034a60cdf47302af76f2f324303bfcdc83
treecd589fa773b4c07c8e8b371b37827564688be2a5
parent12a37fc6e0114b09e6a9c7d0b17f128028e9a7e2
[PPC64] VSX indexed-form loads use wrong instruction format

The VSX instruction definitions for lxsdx, lxvd2x, lxvdsx, and lxvw4x
incorrectly use the XForm_1 instruction format, rather than the
XX1Form instruction format.  This is likely a pasto when creating
these instructions, which were based on lvx and so forth.  This patch
uses the correct format.

The existing reformatting test (test/MC/PowerPC/vsx.s) missed this
because the two formats differ only in that XX1Form has an extension
to the target register field in bit 31.  The tests for these
instructions used a target register of 7, so the default of 0 in bit
31 for XForm_1 didn't expose a problem.  For register numbers 32-63
this would be noticeable.  I've changed the test to use higher
register numbers to verify my change is effective.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219416 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCInstrVSX.td
test/MC/PowerPC/vsx.s