[llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrThumb.td
Evan Cheng
evan.cheng at apple.com
Fri Jan 26 16:07:32 PST 2007
Changes in directory llvm/lib/Target/ARM:
ARMInstrThumb.td updated: 1.5 -> 1.6
---
Log message:
Thumb add / sub with carry.
---
Diffs of the changes: (+17 -1)
ARMInstrThumb.td | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletion(-)
Index: llvm/lib/Target/ARM/ARMInstrThumb.td
diff -u llvm/lib/Target/ARM/ARMInstrThumb.td:1.5 llvm/lib/Target/ARM/ARMInstrThumb.td:1.6
--- llvm/lib/Target/ARM/ARMInstrThumb.td:1.5 Fri Jan 26 15:33:19 2007
+++ llvm/lib/Target/ARM/ARMInstrThumb.td Fri Jan 26 18:07:15 2007
@@ -266,6 +266,16 @@
// Arithmetic Instructions.
//
+// Add with carry
+def tADC : TIt<(ops GPR:$dst, GPR:$lhs, GPR:$rhs),
+ "adc $dst, $rhs",
+ [(set GPR:$dst, (adde GPR:$lhs, GPR:$rhs))]>;
+
+def tADDS : TI<(ops GPR:$dst, GPR:$lhs, GPR:$rhs),
+ "adds $dst, $lhs, $rhs",
+ [(set GPR:$dst, (addc GPR:$lhs, GPR:$rhs))]>;
+
+
def tADDi3 : TI<(ops GPR:$dst, GPR:$lhs, i32imm:$rhs),
"add $dst, $lhs, $rhs",
[(set GPR:$dst, (add GPR:$lhs, imm0_7:$rhs))]>;
@@ -288,7 +298,6 @@
def tADDspi : TIt<(ops GPR:$dst, GPR:$lhs, i32imm:$rhs),
"add $dst, $rhs * 4", []>;
-
def tAND : TIt<(ops GPR:$dst, GPR:$lhs, GPR:$rhs),
"and $dst, $rhs",
[(set GPR:$dst, (and GPR:$lhs, GPR:$rhs))]>;
@@ -395,10 +404,17 @@
"ror $dst, $rhs",
[(set GPR:$dst, (rotr GPR:$lhs, GPR:$rhs))]>;
+
+// Subtract with carry
def tSBC : TIt<(ops GPR:$dst, GPR:$lhs, GPR:$rhs),
"sbc $dst, $rhs",
[(set GPR:$dst, (sube GPR:$lhs, GPR:$rhs))]>;
+def tSUBS : TI<(ops GPR:$dst, GPR:$lhs, GPR:$rhs),
+ "subs $dst, $lhs, $rhs",
+ [(set GPR:$dst, (subc GPR:$lhs, GPR:$rhs))]>;
+
+
// TODO: A7-96: STMIA - store multiple.
def tSUBi3 : TI<(ops GPR:$dst, GPR:$lhs, i32imm:$rhs),
More information about the llvm-commits
mailing list