diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-01-27 00:07:15 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-01-27 00:07:15 +0000 |
commit | 53d7dbafc35b84859f94bbbb41254d3e3a6d9c6b (patch) | |
tree | e9a0ddf4b4e497fd7035bc08696048eefd19083a | |
parent | 7fd9b5ed7f4c48a47011287db624a8ed6084b96d (diff) |
Thumb add / sub with carry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33562 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMInstrThumb.td | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMInstrThumb.td b/lib/Target/ARM/ARMInstrThumb.td index 01aefb54cc..52b8939e24 100644 --- a/lib/Target/ARM/ARMInstrThumb.td +++ b/lib/Target/ARM/ARMInstrThumb.td @@ -266,6 +266,16 @@ def tPUSH : TI<(ops reglist:$src1, variable_ops), // 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 tADDrSPi : TI<(ops GPR:$dst, GPR:$sp, i32imm:$rhs), 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 @@ def tROR : TIt<(ops GPR:$dst, GPR:$lhs, GPR:$rhs), "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), |