[llvm-commits] [llvm] r71393 - /llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.td
Anton Korobeynikov
asl at math.spbu.ru
Sun May 10 07:49:01 PDT 2009
Author: asl
Date: Sun May 10 09:49:00 2009
New Revision: 71393
URL: http://llvm.org/viewvc/llvm-project?rev=71393&view=rev
Log:
Add imm-reg and imm-mem patters for cmp on msp430
(imm is allowed to be source operand, not dest...)
Modified:
llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.td
Modified: llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.td?rev=71393&r1=71392&r2=71393&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.td (original)
+++ llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.td Sun May 10 09:49:00 2009
@@ -708,6 +708,20 @@
"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),
More information about the llvm-commits
mailing list