Add dwarf register numbering to register data.
[oota-llvm.git] / lib / Target / PowerPC / PPCAsmPrinter.cpp
index 9b33dd4bcbac8ca488bc9b379dc78d4430b10af6..8b3ae47b4b2ba90df4b2149967e811277da14e63 100644 (file)
@@ -201,6 +201,20 @@ namespace {
         printOperand(MI, OpNo+1);
       O << ')';
     }
+    void printMemRegImmShifted(const MachineInstr *MI, unsigned OpNo) {
+      if (MI->getOperand(OpNo).isImmediate())
+        printS16X4ImmOperand(MI, OpNo);
+      else 
+        printSymbolLo(MI, OpNo);
+      O << '(';
+      if (MI->getOperand(OpNo+1).isRegister() && 
+          MI->getOperand(OpNo+1).getReg() == PPC::R0)
+        O << "0";
+      else
+        printOperand(MI, OpNo+1);
+      O << ')';
+    }
+    
     void printMemRegReg(const MachineInstr *MI, unsigned OpNo) {
       // When used as the base register, r0 reads constant zero rather than
       // the value contained in the register.  For this reason, the darwin
@@ -493,7 +507,7 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
   O << "\n\n";
   
   // Emit pre-function debug information.
-  DW.BeginFunction(MF);
+  DW.BeginFunction(&MF);
 
   // Print out constants referenced by the function
   EmitConstantPool(MF.getConstantPool());
@@ -540,7 +554,7 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
   }
 
   // Emit post-function debug information.
-  DW.EndFunction(MF);
+  DW.EndFunction();
 
   // We didn't modify anything.
   return false;
@@ -556,7 +570,7 @@ bool DarwinAsmPrinter::doInitialization(Module &M) {
   Mang->setUseQuotes(true);
   
   // Emit initial debug information.
-  DW.BeginModule(M);
+  DW.BeginModule(&M);
   return false;
 }
 
@@ -680,7 +694,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
   }
 
   // Emit initial debug information.
-  DW.EndModule(M);
+  DW.EndModule();
 
   // Funny Darwin hack: This flag tells the linker that no global symbols
   // contain code that falls through to other global symbols (e.g. the obvious