mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Handle ARM compares as well as converting for ARM adds, subs, and thumb2's adds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110762 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0cce3dd326
commit
38ae997e63
@ -1358,6 +1358,8 @@ bool ARMBaseInstrInfo::
|
||||
AnalyzeCompare(const MachineInstr *MI, unsigned &SrcReg, int &CmpValue) const {
|
||||
switch (MI->getOpcode()) {
|
||||
default: break;
|
||||
case ARM::CMPri:
|
||||
case ARM::CMPzri:
|
||||
case ARM::t2CMPri:
|
||||
case ARM::t2CMPzri:
|
||||
SrcReg = MI->getOperand(0).getReg();
|
||||
@ -1398,6 +1400,9 @@ ConvertToSetZeroFlag(MachineInstr *MI, MachineInstr *CmpInstr) const {
|
||||
// Set the "zero" bit in CPSR.
|
||||
switch (MI->getOpcode()) {
|
||||
default: break;
|
||||
case ARM::ADDri:
|
||||
case ARM::SUBri:
|
||||
case ARM::t2ADDri:
|
||||
case ARM::t2SUBri: {
|
||||
MI->RemoveOperand(5);
|
||||
MachineInstrBuilder MB(MI);
|
||||
|
Loading…
x
Reference in New Issue
Block a user