diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2013-07-08 14:49:37 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2013-07-08 14:49:37 +0000 |
commit | 9e5bbeab1f6f79375c24bfab87c28f5f4c5afea1 (patch) | |
tree | d7794fe873c7671e16701d0c7e323890948ed638 /test/MC/PowerPC | |
parent | a012a666888ddd92858eda808af480a01f34bd1e (diff) | |
download | external_llvm-9e5bbeab1f6f79375c24bfab87c28f5f4c5afea1.zip external_llvm-9e5bbeab1f6f79375c24bfab87c28f5f4c5afea1.tar.gz external_llvm-9e5bbeab1f6f79375c24bfab87c28f5f4c5afea1.tar.bz2 |
[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
Diffstat (limited to 'test/MC/PowerPC')
-rw-r--r-- | test/MC/PowerPC/ppc64-encoding.s | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/test/MC/PowerPC/ppc64-encoding.s b/test/MC/PowerPC/ppc64-encoding.s index eac039a..d82d86f 100644 --- a/test/MC/PowerPC/ppc64-encoding.s +++ b/test/MC/PowerPC/ppc64-encoding.s @@ -344,7 +344,25 @@ # FIXME: divdeuo 2, 3, 4 # FIXME: divdeuo. 2, 3, 4 -# FIXME: Fixed-point compare instructions +# Fixed-point compare instructions + +# CHECK: cmpdi 2, 3, 128 # encoding: [0x2d,0x23,0x00,0x80] + cmpi 2, 1, 3, 128 +# CHECK: cmpd 2, 3, 4 # encoding: [0x7d,0x23,0x20,0x00] + cmp 2, 1, 3, 4 +# CHECK: cmpldi 2, 3, 128 # encoding: [0x29,0x23,0x00,0x80] + cmpli 2, 1, 3, 128 +# CHECK: cmpld 2, 3, 4 # encoding: [0x7d,0x23,0x20,0x40] + cmpl 2, 1, 3, 4 + +# CHECK: cmpwi 2, 3, 128 # encoding: [0x2d,0x03,0x00,0x80] + cmpi 2, 0, 3, 128 +# CHECK: cmpw 2, 3, 4 # encoding: [0x7d,0x03,0x20,0x00] + cmp 2, 0, 3, 4 +# CHECK: cmplwi 2, 3, 128 # encoding: [0x29,0x03,0x00,0x80] + cmpli 2, 0, 3, 128 +# CHECK: cmplw 2, 3, 4 # encoding: [0x7d,0x03,0x20,0x40] + cmpl 2, 0, 3, 4 # Fixed-point trap instructions |