[PowerPC] Support basic compare mnemonics
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 8 Jul 2013 14:49:37 +0000 (14:49 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 8 Jul 2013 14:49:37 +0000 (14:49 +0000)
commit9e5bbeab1f6f79375c24bfab87c28f5f4c5afea1
treed7794fe873c7671e16701d0c7e323890948ed638
parenta012a666888ddd92858eda808af480a01f34bd1e
[PowerPC] Support basic compare mnemonics

This adds support for the basic mnemoics (with the L operand) for the
fixed-point compare instructions.  These are defined as aliases for the
already existing CMPW/CMPD patterns, depending on the value of L.

This requires use of InstAlias patterns with immediate literal operands.
To make this work, we need two further changes:

 - define a RegisterPrefix, because otherwise literals 0 and 1 would
   be parsed as literal register names

 - provide a PPCAsmParser::validateTargetOperandClass routine to
   recognize immediate literals (like ARM does)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185826 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
lib/Target/PowerPC/PPC.td
lib/Target/PowerPC/PPCInstrInfo.td
test/MC/PowerPC/ppc64-encoding.s