diff options
| author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-05-10 14:49:00 +0000 |
|---|---|---|
| committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-05-10 14:49:00 +0000 |
| commit | 3c8e0c52d753112db897e7df7780a6b342c9b32f (patch) | |
| tree | 56b81a0f454f7f52c2daee49cf5561e0800ed903 /llvm/lib | |
| parent | 7706cb8d5de4468c647115ec5d28038cf6056971 (diff) | |
| download | bcm5719-llvm-3c8e0c52d753112db897e7df7780a6b342c9b32f.tar.gz bcm5719-llvm-3c8e0c52d753112db897e7df7780a6b342c9b32f.zip | |
Add imm-reg and imm-mem patters for cmp on msp430
(imm is allowed to be source operand, not dest...)
llvm-svn: 71393
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/MSP430/MSP430InstrInfo.td | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/Target/MSP430/MSP430InstrInfo.td b/llvm/lib/Target/MSP430/MSP430InstrInfo.td index 93f5c09db12..de1b2ad6484 100644 --- a/llvm/lib/Target/MSP430/MSP430InstrInfo.td +++ b/llvm/lib/Target/MSP430/MSP430InstrInfo.td @@ -708,6 +708,20 @@ def CMP16rr : Pseudo<(outs), (ins GR16:$src1, GR16:$src2), "cmp.w\t{$src1, $src2}", [(MSP430cmp GR16:$src1, GR16:$src2), (implicit SRW)]>; +def CMP8ir : Pseudo<(outs), (ins i8imm:$src1, GR8:$src2), + "cmp.b\t{$src1, $src2}", + [(MSP430cmp imm:$src1, GR8:$src2), (implicit SRW)]>; +def CMP16ir : Pseudo<(outs), (ins i16imm:$src1, GR16:$src2), + "cmp.w\t{$src1, $src2}", + [(MSP430cmp imm:$src1, GR16:$src2), (implicit SRW)]>; + +def CMP8im : Pseudo<(outs), (ins i8imm:$src1, memsrc:$src2), + "cmp.b\t{$src1, $src2}", + [(MSP430cmp (i8 imm:$src1), (load addr:$src2)), (implicit SRW)]>; +def CMP16im : Pseudo<(outs), (ins i16imm:$src1, memsrc:$src2), + "cmp.w\t{$src1, $src2}", + [(MSP430cmp (i16 imm:$src1), (load addr:$src2)), (implicit SRW)]>; + // FIXME: imm is allowed only on src operand, not on dst. //def CMP8ri : Pseudo<(outs), (ins GR8:$src1, i8imm:$src2), |

