Misc. SSE2 intrinsics: clflush, lfench, mfence
[oota-llvm.git] / lib / Target / PowerPC / PPCAsmPrinter.cpp
index 6fb6e5fd1e3777f692e93a0a8aed54056441a353..b34bf9a8a217813c7962856a2e971d494b1eac28 100644 (file)
@@ -102,6 +102,11 @@ namespace {
                                unsigned AsmVariant, const char *ExtraCode);
     
     
+    void printS5ImmOperand(const MachineInstr *MI, unsigned OpNo) {
+      char value = MI->getOperand(OpNo).getImmedValue();
+      value = (value << (32-5)) >> (32-5);
+      O << (int)value;
+    }
     void printU5ImmOperand(const MachineInstr *MI, unsigned OpNo) {
       unsigned char value = MI->getOperand(OpNo).getImmedValue();
       assert(value <= 31 && "Invalid u5imm argument!");
@@ -506,9 +511,6 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
   SetupMachineFunction(MF);
   O << "\n\n";
   
-  // Emit pre-function debug information.
-  DW.BeginFunction(MF);
-
   // Print out constants referenced by the function
   EmitConstantPool(MF.getConstantPool());
 
@@ -534,6 +536,9 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
   EmitAlignment(4, F);
   O << CurrentFnName << ":\n";
 
+  // Emit pre-function debug information.
+  DW.BeginFunction(&MF);
+
   // Print out code for the function.
   for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
        I != E; ++I) {
@@ -554,7 +559,7 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
   }
 
   // Emit post-function debug information.
-  DW.EndFunction(MF);
+  DW.EndFunction();
 
   // We didn't modify anything.
   return false;
@@ -570,7 +575,7 @@ bool DarwinAsmPrinter::doInitialization(Module &M) {
   Mang->setUseQuotes(true);
   
   // Emit initial debug information.
-  DW.BeginModule(M);
+  DW.BeginModule(&M);
   return false;
 }
 
@@ -694,7 +699,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