aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-05-03 13:02:39 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-05-03 13:02:39 +0000
commit431beb5fa71e3511e685713f004c451302ea3eab (patch)
tree3d75a96233d1fd90cfba4aeda3451b324dcf1265 /lib
parentfff5f76c46b345638dc553cd598d8222d61ea423 (diff)
downloadexternal_llvm-431beb5fa71e3511e685713f004c451302ea3eab.zip
external_llvm-431beb5fa71e3511e685713f004c451302ea3eab.tar.gz
external_llvm-431beb5fa71e3511e685713f004c451302ea3eab.tar.bz2
Add simple reg-reg add.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70712 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/MSP430/MSP430InstrInfo.td14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/MSP430/MSP430InstrInfo.td b/lib/Target/MSP430/MSP430InstrInfo.td
index 308a8d0..06709d5 100644
--- a/lib/Target/MSP430/MSP430InstrInfo.td
+++ b/lib/Target/MSP430/MSP430InstrInfo.td
@@ -60,3 +60,17 @@ def MOV16ri : Pseudo<(outs GR16:$dst), (ins i16imm:$src),
"mov.w\t{$src, $dst|$dst, $src}",
[(set GR16:$dst, imm:$src)]>;
}
+
+//===----------------------------------------------------------------------===//
+// Arithmetic Instructions
+
+let Defs = [SR] in {
+let isCommutable = 1 in { // X = ADD Y, Z == X = ADD Z, Y
+
+// FIXME: Provide proper encoding!
+def ADD16rr : Pseudo<(outs GR16:$dst), (ins GR16:$src1, GR16:$src2),
+ "add.w\t{$src2, $dst|$dst, $src2}",
+ [(set GR16:$dst, (add GR16:$src1, GR16:$src2)),
+ (implicit SR)]>;
+}
+}