mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Thumb add / sub with carry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33562 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7fd9b5ed7f
commit
53d7dbafc3
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user