diff options
Diffstat (limited to 'llvm/lib/Target/X86')
| -rw-r--r-- | llvm/lib/Target/X86/X86CodeEmitter.cpp | 14 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86FastISel.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrBuilder.h | 6 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 32 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86MCCodeEmitter.cpp | 18 | 
5 files changed, 36 insertions, 36 deletions
diff --git a/llvm/lib/Target/X86/X86CodeEmitter.cpp b/llvm/lib/Target/X86/X86CodeEmitter.cpp index 421e221d205..4b11db7c033 100644 --- a/llvm/lib/Target/X86/X86CodeEmitter.cpp +++ b/llvm/lib/Target/X86/X86CodeEmitter.cpp @@ -68,7 +68,7 @@ namespace {        return "X86 Machine Code Emitter";      } -    void emitInstruction(MachineInstr &MI, const TargetInstrDesc *Desc); +    void emitInstruction(MachineInstr &MI, const MCInstrDesc *Desc);      void getAnalysisUsage(AnalysisUsage &AU) const {        AU.setPreservesAll(); @@ -132,7 +132,7 @@ bool Emitter<CodeEmitter>::runOnMachineFunction(MachineFunction &MF) {        MCE.StartMachineBasicBlock(MBB);        for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end();             I != E; ++I) { -        const TargetInstrDesc &Desc = I->getDesc(); +        const MCInstrDesc &Desc = I->getDesc();          emitInstruction(*I, &Desc);          // MOVPC32r is basically a call plus a pop instruction.          if (Desc.getOpcode() == X86::MOVPC32r) @@ -150,7 +150,7 @@ bool Emitter<CodeEmitter>::runOnMachineFunction(MachineFunction &MF) {  /// size, and 3) use of X86-64 extended registers.  static unsigned determineREX(const MachineInstr &MI) {    unsigned REX = 0; -  const TargetInstrDesc &Desc = MI.getDesc(); +  const MCInstrDesc &Desc = MI.getDesc();    // Pseudo instructions do not need REX prefix byte.    if ((Desc.TSFlags & X86II::FormMask) == X86II::Pseudo) @@ -161,7 +161,7 @@ static unsigned determineREX(const MachineInstr &MI) {    unsigned NumOps = Desc.getNumOperands();    if (NumOps) {      bool isTwoAddr = NumOps > 1 && -    Desc.getOperandConstraint(1, TOI::TIED_TO) != -1; +    Desc.getOperandConstraint(1, MCOI::TIED_TO) != -1;      // If it accesses SPL, BPL, SIL, or DIL, then it requires a 0x40 REX prefix.      unsigned i = isTwoAddr ? 1 : 0; @@ -598,7 +598,7 @@ void Emitter<CodeEmitter>::emitMemModRMByte(const MachineInstr &MI,  template<class CodeEmitter>  void Emitter<CodeEmitter>::emitInstruction(MachineInstr &MI, -                                           const TargetInstrDesc *Desc) { +                                           const MCInstrDesc *Desc) {    DEBUG(dbgs() << MI);    // If this is a pseudo instruction, lower it. @@ -708,9 +708,9 @@ void Emitter<CodeEmitter>::emitInstruction(MachineInstr &MI,    // If this is a two-address instruction, skip one of the register operands.    unsigned NumOps = Desc->getNumOperands();    unsigned CurOp = 0; -  if (NumOps > 1 && Desc->getOperandConstraint(1, TOI::TIED_TO) != -1) +  if (NumOps > 1 && Desc->getOperandConstraint(1, MCOI::TIED_TO) != -1)      ++CurOp; -  else if (NumOps > 2 && Desc->getOperandConstraint(NumOps-1, TOI::TIED_TO)== 0) +  else if (NumOps > 2 && Desc->getOperandConstraint(NumOps-1,MCOI::TIED_TO)== 0)      // Skip the last source operand that is tied_to the dest reg. e.g. LXADD32      --NumOps; diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp index a4d1c675ee6..09ce538bf98 100644 --- a/llvm/lib/Target/X86/X86FastISel.cpp +++ b/llvm/lib/Target/X86/X86FastISel.cpp @@ -1393,7 +1393,7 @@ bool X86FastISel::X86VisitIntrinsicCall(const IntrinsicInst &I) {      assert(DI->getAddress() && "Null address should be checked earlier!");      if (!X86SelectAddress(DI->getAddress(), AM))        return false; -    const TargetInstrDesc &II = TII.get(TargetOpcode::DBG_VALUE); +    const MCInstrDesc &II = TII.get(TargetOpcode::DBG_VALUE);      // FIXME may need to add RegState::Debug to any registers produced,      // although ESP/EBP should be the only ones at the moment.      addFullAddress(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, II), AM). diff --git a/llvm/lib/Target/X86/X86InstrBuilder.h b/llvm/lib/Target/X86/X86InstrBuilder.h index 1ea8071053e..0245e5c0964 100644 --- a/llvm/lib/Target/X86/X86InstrBuilder.h +++ b/llvm/lib/Target/X86/X86InstrBuilder.h @@ -150,11 +150,11 @@ addFrameReference(const MachineInstrBuilder &MIB, int FI, int Offset = 0) {    MachineInstr *MI = MIB;    MachineFunction &MF = *MI->getParent()->getParent();    MachineFrameInfo &MFI = *MF.getFrameInfo(); -  const TargetInstrDesc &TID = MI->getDesc(); +  const MCInstrDesc &MCID = MI->getDesc();    unsigned Flags = 0; -  if (TID.mayLoad()) +  if (MCID.mayLoad())      Flags |= MachineMemOperand::MOLoad; -  if (TID.mayStore()) +  if (MCID.mayStore())      Flags |= MachineMemOperand::MOStore;    MachineMemOperand *MMO =      MF.getMachineMemOperand(MachinePointerInfo::getFixedStack(FI, Offset), diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index d4c279c04ca..f875010e04e 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -1689,13 +1689,13 @@ X86::CondCode X86::GetOppositeBranchCondition(X86::CondCode CC) {  }  bool X86InstrInfo::isUnpredicatedTerminator(const MachineInstr *MI) const { -  const TargetInstrDesc &TID = MI->getDesc(); -  if (!TID.isTerminator()) return false; +  const MCInstrDesc &MCID = MI->getDesc(); +  if (!MCID.isTerminator()) return false;    // Conditional branch is a special case. -  if (TID.isBranch() && !TID.isBarrier()) +  if (MCID.isBranch() && !MCID.isBarrier())      return true; -  if (!TID.isPredicable()) +  if (!MCID.isPredicable())      return true;    return !isPredicated(MI);  } @@ -2225,7 +2225,7 @@ X86InstrInfo::foldMemoryOperandImpl(MachineFunction &MF,    bool isTwoAddrFold = false;    unsigned NumOps = MI->getDesc().getNumOperands();    bool isTwoAddr = NumOps > 1 && -    MI->getDesc().getOperandConstraint(1, TOI::TIED_TO) != -1; +    MI->getDesc().getOperandConstraint(1, MCOI::TIED_TO) != -1;    // FIXME: AsmPrinter doesn't know how to handle    // X86II::MO_GOT_ABSOLUTE_ADDRESS after folding. @@ -2543,7 +2543,7 @@ bool X86InstrInfo::canFoldMemoryOperand(const MachineInstr *MI,    unsigned Opc = MI->getOpcode();    unsigned NumOps = MI->getDesc().getNumOperands();    bool isTwoAddr = NumOps > 1 && -    MI->getDesc().getOperandConstraint(1, TOI::TIED_TO) != -1; +    MI->getDesc().getOperandConstraint(1, MCOI::TIED_TO) != -1;    // Folding a memory location into the two-address part of a two-address    // instruction is different than folding it other places.  It requires @@ -2589,8 +2589,8 @@ bool X86InstrInfo::unfoldMemoryOperand(MachineFunction &MF, MachineInstr *MI,      return false;    UnfoldStore &= FoldedStore; -  const TargetInstrDesc &TID = get(Opc); -  const TargetRegisterClass *RC = getRegClass(TID, Index, &RI); +  const MCInstrDesc &MCID = get(Opc); +  const TargetRegisterClass *RC = getRegClass(MCID, Index, &RI);    if (!MI->hasOneMemOperand() &&        RC == &X86::VR128RegClass &&        !TM.getSubtarget<X86Subtarget>().isUnalignedMemAccessFast()) @@ -2632,7 +2632,7 @@ bool X86InstrInfo::unfoldMemoryOperand(MachineFunction &MF, MachineInstr *MI,    }    // Emit the data processing instruction. -  MachineInstr *DataMI = MF.CreateMachineInstr(TID, MI->getDebugLoc(), true); +  MachineInstr *DataMI = MF.CreateMachineInstr(MCID, MI->getDebugLoc(), true);    MachineInstrBuilder MIB(DataMI);    if (FoldedStore) @@ -2685,7 +2685,7 @@ bool X86InstrInfo::unfoldMemoryOperand(MachineFunction &MF, MachineInstr *MI,    // Emit the store instruction.    if (UnfoldStore) { -    const TargetRegisterClass *DstRC = getRegClass(TID, 0, &RI); +    const TargetRegisterClass *DstRC = getRegClass(MCID, 0, &RI);      std::pair<MachineInstr::mmo_iterator,                MachineInstr::mmo_iterator> MMOs =        MF.extractStoreMemRefs(MI->memoperands_begin(), @@ -2710,9 +2710,9 @@ X86InstrInfo::unfoldMemoryOperand(SelectionDAG &DAG, SDNode *N,    unsigned Index = I->second.second & 0xf;    bool FoldedLoad = I->second.second & (1 << 4);    bool FoldedStore = I->second.second & (1 << 5); -  const TargetInstrDesc &TID = get(Opc); -  const TargetRegisterClass *RC = getRegClass(TID, Index, &RI); -  unsigned NumDefs = TID.NumDefs; +  const MCInstrDesc &MCID = get(Opc); +  const TargetRegisterClass *RC = getRegClass(MCID, Index, &RI); +  unsigned NumDefs = MCID.NumDefs;    std::vector<SDValue> AddrOps;    std::vector<SDValue> BeforeOps;    std::vector<SDValue> AfterOps; @@ -2756,13 +2756,13 @@ X86InstrInfo::unfoldMemoryOperand(SelectionDAG &DAG, SDNode *N,    // Emit the data processing instruction.    std::vector<EVT> VTs;    const TargetRegisterClass *DstRC = 0; -  if (TID.getNumDefs() > 0) { -    DstRC = getRegClass(TID, 0, &RI); +  if (MCID.getNumDefs() > 0) { +    DstRC = getRegClass(MCID, 0, &RI);      VTs.push_back(*DstRC->vt_begin());    }    for (unsigned i = 0, e = N->getNumValues(); i != e; ++i) {      EVT VT = N->getValueType(i); -    if (VT != MVT::Other && i >= (unsigned)TID.getNumDefs()) +    if (VT != MVT::Other && i >= (unsigned)MCID.getNumDefs())        VTs.push_back(VT);    }    if (Load) diff --git a/llvm/lib/Target/X86/X86MCCodeEmitter.cpp b/llvm/lib/Target/X86/X86MCCodeEmitter.cpp index 55aceba9f27..04149e73481 100644 --- a/llvm/lib/Target/X86/X86MCCodeEmitter.cpp +++ b/llvm/lib/Target/X86/X86MCCodeEmitter.cpp @@ -111,7 +111,7 @@ public:                           SmallVectorImpl<MCFixup> &Fixups) const;    void EmitVEXOpcodePrefix(uint64_t TSFlags, unsigned &CurByte, int MemOperand, -                           const MCInst &MI, const TargetInstrDesc &Desc, +                           const MCInst &MI, const MCInstrDesc &Desc,                             raw_ostream &OS) const;    void EmitSegmentOverridePrefix(uint64_t TSFlags, unsigned &CurByte, @@ -119,7 +119,7 @@ public:                                   raw_ostream &OS) const;    void EmitOpcodePrefix(uint64_t TSFlags, unsigned &CurByte, int MemOperand, -                        const MCInst &MI, const TargetInstrDesc &Desc, +                        const MCInst &MI, const MCInstrDesc &Desc,                          raw_ostream &OS) const;  }; @@ -379,7 +379,7 @@ void X86MCCodeEmitter::EmitMemModRMByte(const MCInst &MI, unsigned Op,  /// called VEX.  void X86MCCodeEmitter::EmitVEXOpcodePrefix(uint64_t TSFlags, unsigned &CurByte,                                             int MemOperand, const MCInst &MI, -                                           const TargetInstrDesc &Desc, +                                           const MCInstrDesc &Desc,                                             raw_ostream &OS) const {    bool HasVEX_4V = false;    if ((TSFlags >> X86II::VEXShift) & X86II::VEX_4V) @@ -586,7 +586,7 @@ void X86MCCodeEmitter::EmitVEXOpcodePrefix(uint64_t TSFlags, unsigned &CurByte,  /// REX prefix which specifies 1) 64-bit instructions, 2) non-default operand  /// size, and 3) use of X86-64 extended registers.  static unsigned DetermineREXPrefix(const MCInst &MI, uint64_t TSFlags, -                                   const TargetInstrDesc &Desc) { +                                   const MCInstrDesc &Desc) {    unsigned REX = 0;    if (TSFlags & X86II::REX_W)      REX |= 1 << 3; // set REX.W @@ -596,7 +596,7 @@ static unsigned DetermineREXPrefix(const MCInst &MI, uint64_t TSFlags,    unsigned NumOps = MI.getNumOperands();    // FIXME: MCInst should explicitize the two-addrness.    bool isTwoAddr = NumOps > 1 && -                      Desc.getOperandConstraint(1, TOI::TIED_TO) != -1; +                      Desc.getOperandConstraint(1, MCOI::TIED_TO) != -1;    // If it accesses SPL, BPL, SIL, or DIL, then it requires a 0x40 REX prefix.    unsigned i = isTwoAddr ? 1 : 0; @@ -713,7 +713,7 @@ void X86MCCodeEmitter::EmitSegmentOverridePrefix(uint64_t TSFlags,  /// Not present, it is -1.  void X86MCCodeEmitter::EmitOpcodePrefix(uint64_t TSFlags, unsigned &CurByte,                                          int MemOperand, const MCInst &MI, -                                        const TargetInstrDesc &Desc, +                                        const MCInstrDesc &Desc,                                          raw_ostream &OS) const {    // Emit the lock opcode prefix as needed. @@ -803,7 +803,7 @@ void X86MCCodeEmitter::  EncodeInstruction(const MCInst &MI, raw_ostream &OS,                    SmallVectorImpl<MCFixup> &Fixups) const {    unsigned Opcode = MI.getOpcode(); -  const TargetInstrDesc &Desc = TII.get(Opcode); +  const MCInstrDesc &Desc = TII.get(Opcode);    uint64_t TSFlags = Desc.TSFlags;    // Pseudo instructions don't get encoded. @@ -814,9 +814,9 @@ EncodeInstruction(const MCInst &MI, raw_ostream &OS,    // FIXME: This should be handled during MCInst lowering.    unsigned NumOps = Desc.getNumOperands();    unsigned CurOp = 0; -  if (NumOps > 1 && Desc.getOperandConstraint(1, TOI::TIED_TO) != -1) +  if (NumOps > 1 && Desc.getOperandConstraint(1, MCOI::TIED_TO) != -1)      ++CurOp; -  else if (NumOps > 2 && Desc.getOperandConstraint(NumOps-1, TOI::TIED_TO)== 0) +  else if (NumOps > 2 && Desc.getOperandConstraint(NumOps-1, MCOI::TIED_TO)== 0)      // Skip the last source operand that is tied_to the dest reg. e.g. LXADD32      --NumOps;  | 

