diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-05-03 13:02:39 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-05-03 13:02:39 +0000 |
commit | 431beb5fa71e3511e685713f004c451302ea3eab (patch) | |
tree | 3d75a96233d1fd90cfba4aeda3451b324dcf1265 /lib/Target | |
parent | fff5f76c46b345638dc553cd598d8222d61ea423 (diff) | |
download | external_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/Target')
-rw-r--r-- | lib/Target/MSP430/MSP430InstrInfo.td | 14 |
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)]>; +} +} |