Fix ARMAsmParser::ParseMemoryOffsetReg() where the parameter OffsetRegNum should
[oota-llvm.git] / lib / Target / ARM / ARMInstrInfo.cpp
index fda9fc23eb294a9221e81019e5108fcc0afa7ab7..86bbe2a4c61f2612069d2b6d9644f9f7e8683f93 100644 (file)
 #include "llvm/CodeGen/MachineFrameInfo.h"
 #include "llvm/CodeGen/MachineInstrBuilder.h"
 #include "llvm/CodeGen/MachineJumpTableInfo.h"
-#include "llvm/Target/TargetAsmInfo.h"
-#include "llvm/Support/CommandLine.h"
+#include "llvm/MC/MCAsmInfo.h"
 using namespace llvm;
 
 ARMInstrInfo::ARMInstrInfo(const ARMSubtarget &STI)
   : ARMBaseInstrInfo(STI), RI(*this, STI) {
 }
 
-unsigned ARMInstrInfo::
-getUnindexedOpcode(unsigned Opc) const {
+unsigned ARMInstrInfo::getUnindexedOpcode(unsigned Opc) const {
   switch (Opc) {
   default: break;
   case ARM::LDR_PRE:
@@ -62,33 +60,14 @@ getUnindexedOpcode(unsigned Opc) const {
   return 0;
 }
 
-unsigned ARMInstrInfo::
-getOpcode(ARMII::Op Op) const {
-  switch (Op) {
-  case ARMII::ADDri: return ARM::ADDri;
-  case ARMII::ADDrs: return ARM::ADDrs;
-  case ARMII::ADDrr: return ARM::ADDrr;
-  case ARMII::LDRri: return 0;
-  case ARMII::MOVr: return ARM::MOVr;
-  case ARMII::STRri: return 0;
-  case ARMII::SUBri: return ARM::SUBri;
-  case ARMII::SUBrs: return ARM::SUBrs;
-  case ARMII::SUBrr: return ARM::SUBrr;
-  default:
-    break;
-  }
-
-  return 0;
-}
-
-bool ARMInstrInfo::
-BlockHasNoFallThrough(const MachineBasicBlock &MBB) const {
+bool ARMInstrInfo::BlockHasNoFallThrough(const MachineBasicBlock &MBB) const {
   if (MBB.empty()) return false;
 
   switch (MBB.back().getOpcode()) {
   case ARM::BX_RET:   // Return.
   case ARM::LDM_RET:
   case ARM::B:
+  case ARM::BRIND:
   case ARM::BR_JTr:   // Jumptable branch.
   case ARM::BR_JTm:   // Jumptable branch through mem.
   case ARM::BR_JTadd: // Jumptable branch add to pc.
@@ -119,3 +98,4 @@ reMaterialize(MachineBasicBlock &MBB,
   MI->getOperand(0).setReg(DestReg);
   MBB.insert(I, MI);
 }
+