diff options
Diffstat (limited to 'lib/Target/PIC16')
-rw-r--r-- | lib/Target/PIC16/PIC16AsmPrinter.cpp | 8 | ||||
-rw-r--r-- | lib/Target/PIC16/PIC16InstrInfo.cpp | 10 | ||||
-rw-r--r-- | lib/Target/PIC16/PIC16RegisterInfo.cpp | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/Target/PIC16/PIC16AsmPrinter.cpp b/lib/Target/PIC16/PIC16AsmPrinter.cpp index 5102e7a..d765d75 100644 --- a/lib/Target/PIC16/PIC16AsmPrinter.cpp +++ b/lib/Target/PIC16/PIC16AsmPrinter.cpp @@ -288,7 +288,7 @@ printSOImm(raw_ostream &O, int64_t V, const TargetAsmInfo *TAI) void PIC16AsmPrinter::printSOImmOperand(const MachineInstr *MI, int OpNum) { const MachineOperand &MO = MI->getOperand(OpNum); - assert(MO.isImmediate() && "Not a valid so_imm value!"); + assert(MO.isImm() && "Not a valid so_imm value!"); printSOImm(O, MO.getImm(), TAI); } @@ -298,19 +298,19 @@ void PIC16AsmPrinter::printAddrModeOperand(const MachineInstr *MI, int Op) const MachineOperand &MO1 = MI->getOperand(Op); const MachineOperand &MO2 = MI->getOperand(Op+1); - if (MO2.isFrameIndex ()) { + if (MO2.isFI()) { printOperand(MI, Op+1); return; } - if (!MO1.isRegister()) { + if (!MO1.isReg()) { // FIXME: This is for CP entries, but isn't right. printOperand(MI, Op); return; } // If this is Stack Slot - if (MO1.isRegister()) { + if (MO1.isReg()) { if (strcmp(TM.getRegisterInfo()->get(MO1.getReg()).Name, "SP") == 0) { O << CurrentFnName <<"_"<< MO2.getImm(); return; diff --git a/lib/Target/PIC16/PIC16InstrInfo.cpp b/lib/Target/PIC16/PIC16InstrInfo.cpp index e3581ce..cc1cb88 100644 --- a/lib/Target/PIC16/PIC16InstrInfo.cpp +++ b/lib/Target/PIC16/PIC16InstrInfo.cpp @@ -27,7 +27,7 @@ PIC16InstrInfo::PIC16InstrInfo(PIC16TargetMachine &tm) TM(tm), RI(*this) {} static bool isZeroImm(const MachineOperand &op) { - return op.isImmediate() && op.getImm() == 0; + return op.isImm() && op.getImm() == 0; } @@ -40,8 +40,8 @@ unsigned PIC16InstrInfo:: isLoadFromStackSlot(MachineInstr *MI, int &FrameIndex) const { if (MI->getOpcode() == PIC16::MOVF) { - if ((MI->getOperand(2).isFrameIndex()) && // is a stack slot - (MI->getOperand(1).isImmediate()) && // the imm is zero + if ((MI->getOperand(2).isFI()) && // is a stack slot + (MI->getOperand(1).isImm()) && // the imm is zero (isZeroImm(MI->getOperand(1)))) { FrameIndex = MI->getOperand(2).getIndex(); return MI->getOperand(0).getReg(); @@ -60,8 +60,8 @@ unsigned PIC16InstrInfo:: isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const { if (MI->getOpcode() == PIC16::MOVWF) { - if ((MI->getOperand(0).isFrameIndex()) && // is a stack slot - (MI->getOperand(1).isImmediate()) && // the imm is zero + if ((MI->getOperand(0).isFI()) && // is a stack slot + (MI->getOperand(1).isImm()) && // the imm is zero (isZeroImm(MI->getOperand(1)))) { FrameIndex = MI->getOperand(0).getIndex(); return MI->getOperand(2).getReg(); diff --git a/lib/Target/PIC16/PIC16RegisterInfo.cpp b/lib/Target/PIC16/PIC16RegisterInfo.cpp index 9a83155..d05f62c 100644 --- a/lib/Target/PIC16/PIC16RegisterInfo.cpp +++ b/lib/Target/PIC16/PIC16RegisterInfo.cpp @@ -141,7 +141,7 @@ eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, MachineFunction &MF = *MI.getParent()->getParent(); unsigned i = 0; - while (!MI.getOperand(i).isFrameIndex()) { + while (!MI.getOperand(i).isFI()) { ++i; assert(i < MI.getNumOperands() && "Instr doesn't have FrameIndex operand!"); |