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 | c0944b50fe93f69a7170e66349c323ebea2e1939 (patch) | |
| tree | b56ac53c4bd05e6bc5a7bafc9a7827a98d1be906 /llvm/test | |
| parent | c9b82d76e27e4b76dc703670c167c4e5f3071250 (diff) | |
| download | bcm5719-llvm-c0944b50fe93f69a7170e66349c323ebea2e1939.tar.gz bcm5719-llvm-c0944b50fe93f69a7170e66349c323ebea2e1939.zip | |
[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)
llvm-svn: 185826
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/MC/PowerPC/ppc64-encoding.s | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/llvm/test/MC/PowerPC/ppc64-encoding.s b/llvm/test/MC/PowerPC/ppc64-encoding.s index eac039a61bd..d82d86fd010 100644 --- a/llvm/test/MC/PowerPC/ppc64-encoding.s +++ b/llvm/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 |

