Patches towards fixing PR341
authorChris Lattner <sabre@nondot.org>
Thu, 15 Jul 2004 02:14:30 +0000 (02:14 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 15 Jul 2004 02:14:30 +0000 (02:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14841 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp
lib/Target/PowerPC/Makefile
lib/Target/PowerPC/PPC32ISelSimple.cpp
lib/Target/PowerPC/PPCTargetMachine.cpp
lib/Target/PowerPC/PowerPCISelSimple.cpp
lib/Target/SparcV9/InstrSelection/InstrForest.cpp
lib/Target/X86/InstSelectSimple.cpp
lib/Target/X86/X86ISelSimple.cpp
lib/Target/X86/X86SimpInstrSelector.cpp

index a7c2bd5fc21db1605d2f11366e43bc3ea4c74126..139320f64033962062eaacf6aad7d24d141b7050 100644 (file)
@@ -273,7 +273,7 @@ std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty,
     case Type::FloatTyID:  return Out << "float "              << NameSoFar;
     case Type::DoubleTyID: return Out << "double "             << NameSoFar;
     default :
-      std::cerr << "Unknown primitive type: " << Ty << "\n";
+      std::cerr << "Unknown primitive type: " << *Ty << "\n";
       abort();
     }
   
@@ -517,7 +517,7 @@ void CWriter::printConstant(Constant *CPV) {
 
     default:
       std::cerr << "CWriter Error: Unhandled constant expression: "
-                << CE << "\n";
+                << *CE << "\n";
       abort();
     }
   }
@@ -626,7 +626,7 @@ void CWriter::printConstant(Constant *CPV) {
     }
     // FALL THROUGH
   default:
-    std::cerr << "Unknown constant type: " << CPV << "\n";
+    std::cerr << "Unknown constant type: " << *CPV << "\n";
     abort();
   }
 }
index a7c2bd5fc21db1605d2f11366e43bc3ea4c74126..139320f64033962062eaacf6aad7d24d141b7050 100644 (file)
@@ -273,7 +273,7 @@ std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty,
     case Type::FloatTyID:  return Out << "float "              << NameSoFar;
     case Type::DoubleTyID: return Out << "double "             << NameSoFar;
     default :
-      std::cerr << "Unknown primitive type: " << Ty << "\n";
+      std::cerr << "Unknown primitive type: " << *Ty << "\n";
       abort();
     }
   
@@ -517,7 +517,7 @@ void CWriter::printConstant(Constant *CPV) {
 
     default:
       std::cerr << "CWriter Error: Unhandled constant expression: "
-                << CE << "\n";
+                << *CE << "\n";
       abort();
     }
   }
@@ -626,7 +626,7 @@ void CWriter::printConstant(Constant *CPV) {
     }
     // FALL THROUGH
   default:
-    std::cerr << "Unknown constant type: " << CPV << "\n";
+    std::cerr << "Unknown constant type: " << *CPV << "\n";
     abort();
   }
 }
index ef9fff7377b4ff9c9281f1b424b02da8ac1b1fe7..1aa9b8e733087a250df9a40389b2948e237c9027 100644 (file)
@@ -7,7 +7,8 @@
 # 
 ##===----------------------------------------------------------------------===##
 LEVEL = ../../..
-LIBRARYNAME = powerpc
+LIBRARYNAME = powerpc2
+SHARED_LIBRARY=1
 include $(LEVEL)/Makefile.common
 
 # Make sure that tblgen is run, first thing.
index 10a19b55246c33605f283e3d1954486acc10e24c..6ce7f76ed4e3277f1bb4b968412fc23918e34160 100644 (file)
@@ -529,7 +529,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB,
     unsigned AddrReg = getReg(CPR->getValue(), MBB, IP);
     BuildMI(*MBB, IP, PPC32::OR, 2, R).addReg(AddrReg).addReg(AddrReg);
   } else {
-    std::cerr << "Offending constant: " << C << "\n";
+    std::cerr << "Offending constant: " << *C << "\n";
     assert(0 && "Type not handled yet!");
   }
 }
index 25c7fc0959e205810369bc07089d0cebe1ba0de4..7d875dd631d04ff5e7238151c861fa9032aed33e 100644 (file)
@@ -25,7 +25,7 @@ using namespace llvm;
 
 namespace {
   // Register the target.
-  RegisterTarget<PowerPCTargetMachine> X("powerpc", "  PowerPC (experimental)");
+  RegisterTarget<PowerPCTargetMachine> X("powerpc2", "  PowerPC X (experimental)");
 }
 
 unsigned PowerPCTargetMachine::getJITMatchQuality() {
index 10a19b55246c33605f283e3d1954486acc10e24c..6ce7f76ed4e3277f1bb4b968412fc23918e34160 100644 (file)
@@ -529,7 +529,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB,
     unsigned AddrReg = getReg(CPR->getValue(), MBB, IP);
     BuildMI(*MBB, IP, PPC32::OR, 2, R).addReg(AddrReg).addReg(AddrReg);
   } else {
-    std::cerr << "Offending constant: " << C << "\n";
+    std::cerr << "Offending constant: " << *C << "\n";
     assert(0 && "Type not handled yet!");
   }
 }
index 675bc2d58abb43e6ff3bea4819ecb7531ef83668..cc22b3774a1cff8a834b54636c94ce07d05950cc 100644 (file)
@@ -124,21 +124,21 @@ void
 VRegNode::dumpNode(int indent) const {
   for (int i=0; i < indent; i++)
     std::cerr << "    ";
-    std::cerr << "VReg " << getValue() << "\n";
+    std::cerr << "VReg " << *getValue() << "\n";
 }
 
 void
 ConstantNode::dumpNode(int indent) const {
   for (int i=0; i < indent; i++)
     std::cerr << "    ";
-  std::cerr << "Constant " << getValue() << "\n";
+  std::cerr << "Constant " << *getValue() << "\n";
 }
 
 void LabelNode::dumpNode(int indent) const {
   for (int i=0; i < indent; i++)
     std::cerr << "    ";
   
-  std::cerr << "Label " << getValue() << "\n";
+  std::cerr << "Label " << *getValue() << "\n";
 }
 
 //------------------------------------------------------------------------
index 68a602b31435d9a81bb8c26accf193632d536289..06165e9f6e1843d37815837ab590ffcfefd9a004 100644 (file)
@@ -507,7 +507,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB,
       return;
 
     default:
-      std::cerr << "Offending expr: " << C << "\n";
+      std::cerr << "Offending expr: " << *C << "\n";
       assert(0 && "Constant expression not yet handled!\n");
     }
   }
@@ -557,7 +557,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB,
   } else if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(C)) {
     BuildMI(*MBB, IP, X86::MOV32ri, 1, R).addGlobalAddress(CPR->getValue());
   } else {
-    std::cerr << "Offending constant: " << C << "\n";
+    std::cerr << "Offending constant: " << *C << "\n";
     assert(0 && "Type not handled yet!");
   }
 }
index 68a602b31435d9a81bb8c26accf193632d536289..06165e9f6e1843d37815837ab590ffcfefd9a004 100644 (file)
@@ -507,7 +507,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB,
       return;
 
     default:
-      std::cerr << "Offending expr: " << C << "\n";
+      std::cerr << "Offending expr: " << *C << "\n";
       assert(0 && "Constant expression not yet handled!\n");
     }
   }
@@ -557,7 +557,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB,
   } else if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(C)) {
     BuildMI(*MBB, IP, X86::MOV32ri, 1, R).addGlobalAddress(CPR->getValue());
   } else {
-    std::cerr << "Offending constant: " << C << "\n";
+    std::cerr << "Offending constant: " << *C << "\n";
     assert(0 && "Type not handled yet!");
   }
 }
index e310d04b3b4e63ddbed3806d36cbb892685b7307..9fd487374d8aba24c44d3f8096f957436368e69c 100644 (file)
@@ -433,7 +433,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB,
       return;
 
     default:
-      std::cerr << "Offending expr: " << C << "\n";
+      std::cerr << "Offending expr: " << *C << "\n";
       assert(0 && "Constant expression not yet handled!\n");
     }
   }
@@ -483,7 +483,7 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB,
   } else if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(C)) {
     BuildMI(*MBB, IP, X86::MOV32ri, 1, R).addGlobalAddress(CPR->getValue());
   } else {
-    std::cerr << "Offending constant: " << C << "\n";
+    std::cerr << "Offending constant: " << *C << "\n";
     assert(0 && "Type not handled yet!");
   }
 }