llvm.org GIT mirror llvm / 53d7dba
Thumb add / sub with carry. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33562 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 13 years ago
1 changed file(s) with 17 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
265265 // Arithmetic Instructions.
266266 //
267267
268 // Add with carry
269 def tADC : TIt<(ops GPR:$dst, GPR:$lhs, GPR:$rhs),
270 "adc $dst, $rhs",
271 [(set GPR:$dst, (adde GPR:$lhs, GPR:$rhs))]>;
272
273 def tADDS : TI<(ops GPR:$dst, GPR:$lhs, GPR:$rhs),
274 "adds $dst, $lhs, $rhs",
275 [(set GPR:$dst, (addc GPR:$lhs, GPR:$rhs))]>;
276
277
268278 def tADDi3 : TI<(ops GPR:$dst, GPR:$lhs, i32imm:$rhs),
269279 "add $dst, $lhs, $rhs",
270280 [(set GPR:$dst, (add GPR:$lhs, imm0_7:$rhs))]>;
286296 "add $dst, $sp, $rhs * 4", []>;
287297 def tADDspi : TIt<(ops GPR:$dst, GPR:$lhs, i32imm:$rhs),
288298 "add $dst, $rhs * 4", []>;
289
290299
291300 def tAND : TIt<(ops GPR:$dst, GPR:$lhs, GPR:$rhs),
292301 "and $dst, $rhs",
394403 "ror $dst, $rhs",
395404 [(set GPR:$dst, (rotr GPR:$lhs, GPR:$rhs))]>;
396405
406
407 // Subtract with carry
397408 def tSBC : TIt<(ops GPR:$dst, GPR:$lhs, GPR:$rhs),
398409 "sbc $dst, $rhs",
399410 [(set GPR:$dst, (sube GPR:$lhs, GPR:$rhs))]>;
411
412 def tSUBS : TI<(ops GPR:$dst, GPR:$lhs, GPR:$rhs),
413 "subs $dst, $lhs, $rhs",
414 [(set GPR:$dst, (subc GPR:$lhs, GPR:$rhs))]>;
415
400416
401417 // TODO: A7-96: STMIA - store multiple.
402418