Remove some more V9-specific stuff.
authorChris Lattner <sabre@nondot.org>
Thu, 4 May 2006 00:49:59 +0000 (00:49 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 4 May 2006 00:49:59 +0000 (00:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28092 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineInstr.h
lib/CodeGen/MachineInstr.cpp
lib/Target/Alpha/AlphaAsmPrinter.cpp
lib/Target/X86/X86CodeEmitter.cpp

index 23b56eacb4dbeb14576248a064509cd58a923311..818331d2521792c849d6f88fbfb0db193f3ecd9b 100644 (file)
@@ -75,10 +75,6 @@ private:
   enum {
     DEFFLAG     = 0x01,       // this is a def of the operand
     USEFLAG     = 0x02,       // this is a use of the operand
-    HIFLAG32    = 0x04,       // operand is %hi32(value_or_immedVal)
-    LOFLAG32    = 0x08,       // operand is %lo32(value_or_immedVal)
-    HIFLAG64    = 0x10,       // operand is %hi64(value_or_immedVal)
-    LOFLAG64    = 0x20,       // operand is %lo64(value_or_immedVal)
     PCRELATIVE  = 0x40        // Operand is relative to PC, not a global address
   };
 
@@ -215,13 +211,6 @@ public:
   ///
   UseType getUseType() const { return UseType(flags & (USEFLAG|DEFFLAG)); }
 
-  /// isPCRelative - This returns the value of the PCRELATIVE flag, which
-  /// indicates whether this operand should be emitted as a PC relative value
-  /// instead of a global address.  This is used for operands of the forms:
-  /// MachineBasicBlock, GlobalAddress, ExternalSymbol
-  ///
-  bool isPCRelative() const { return (flags & PCRELATIVE) != 0; }
-
   /// isRegister - Return true if this operand is a register operand.  The X86
   /// backend currently can't decide whether to use MO_MR or MO_VR to represent
   /// them, so we accept both.
@@ -307,10 +296,6 @@ public:
   MachineOperand& setUse          ()       { flags |= USEFLAG; return *this; }
   bool            isDef           () const { return flags & DEFFLAG; }
   MachineOperand& setDef          ()       { flags |= DEFFLAG; return *this; }
-  bool            isHiBits32      () const { return flags & HIFLAG32; }
-  bool            isLoBits32      () const { return flags & LOFLAG32; }
-  bool            isHiBits64      () const { return flags & HIFLAG64; }
-  bool            isLoBits64      () const { return flags & LOFLAG64; }
 
   /// hasAllocatedReg - Returns true iff a machine register has been
   /// allocated to this operand.
index 8889a7aea2da1eed64d1cf1d9e427bc553842156..3d65dfd31bde51402377e8a8ffe913c4946005b3 100644 (file)
@@ -176,18 +176,6 @@ static void print(const MachineOperand &MO, std::ostream &OS,
 
   if (TM) MRI = TM->getRegisterInfo();
 
-  bool CloseParen = true;
-  if (MO.isHiBits32())
-    OS << "%lm(";
-  else if (MO.isLoBits32())
-    OS << "%lo(";
-  else if (MO.isHiBits64())
-    OS << "%hh(";
-  else if (MO.isLoBits64())
-    OS << "%hm(";
-  else
-    CloseParen = false;
-
   switch (MO.getType()) {
   case MachineOperand::MO_VirtualRegister:
     if (MO.getVRegValue()) {
@@ -235,9 +223,6 @@ static void print(const MachineOperand &MO, std::ostream &OS,
   default:
     assert(0 && "Unrecognized operand type");
   }
-
-  if (CloseParen)
-    OS << ")";
 }
 
 void MachineInstr::print(std::ostream &OS, const TargetMachine *TM) const {
@@ -272,8 +257,7 @@ void MachineInstr::print(std::ostream &OS, const TargetMachine *TM) const {
   OS << "\n";
 }
 
-namespace llvm {
-std::ostream &operator<<(std::ostream &os, const MachineInstr &MI) {
+std::ostream &llvm::operator<<(std::ostream &os, const MachineInstr &MI) {
   // If the instruction is embedded into a basic block, we can find the target
   // info for the instruction.
   if (const MachineBasicBlock *MBB = MI.getParent()) {
@@ -301,16 +285,7 @@ std::ostream &operator<<(std::ostream &os, const MachineInstr &MI) {
   return os << "\n";
 }
 
-std::ostream &operator<<(std::ostream &OS, const MachineOperand &MO) {
-  if (MO.isHiBits32())
-    OS << "%lm(";
-  else if (MO.isLoBits32())
-    OS << "%lo(";
-  else if (MO.isHiBits64())
-    OS << "%hh(";
-  else if (MO.isLoBits64())
-    OS << "%hm(";
-
+std::ostream &llvm::operator<<(std::ostream &OS, const MachineOperand &MO) {
   switch (MO.getType()) {
   case MachineOperand::MO_VirtualRegister:
     if (MO.hasAllocatedReg())
@@ -356,10 +331,5 @@ std::ostream &operator<<(std::ostream &OS, const MachineOperand &MO) {
     break;
   }
 
-  if (MO.isHiBits32() || MO.isLoBits32() || MO.isHiBits64() || MO.isLoBits64())
-    OS << ")";
-
   return OS;
 }
-
-}
index 600dbe2247dc5445ca0f935a0bd72adce15e9e48..435e8e84d89fab5f6298b1147b820e6fef09f0dd 100644 (file)
@@ -123,12 +123,7 @@ void AlphaAsmPrinter::printOp(const MachineOperand &MO, bool IsCallOp) {
     return;
 
   case MachineOperand::MO_GlobalAddress:
-    //Abuse PCrel to specify pcrel calls
-    //calls are the only thing that use this flag
-//     if (MO.isPCRelative())
-//       O << PrivateGlobalPrefix << Mang->getValueName(MO.getGlobal()) << "..ng";
-//     else
-      O << Mang->getValueName(MO.getGlobal());
+    O << Mang->getValueName(MO.getGlobal());
     return;
 
   default:
index c2161d84559613310efb1f92c5694f04d7223f4a..65a5a530a340c6b6bd49b88a76902cb13b44c221 100644 (file)
@@ -440,7 +440,6 @@ void Emitter::emitInstruction(const MachineInstr &MI) {
       } else if (MO1.isGlobalAddress()) {
         assert(sizeOfImm(Desc) == 4 &&
                "Don't know how to emit non-pointer values!");
-        assert(!MO1.isPCRelative() && "Function pointer ref is PC relative?");
         emitGlobalAddressForPtr(MO1.getGlobal(), MO1.getOffset());
       } else if (MO1.isExternalSymbol()) {
         assert(sizeOfImm(Desc) == 4 &&