[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC64AsmPrinter.cpp

Misha Brukman brukman at cs.uiuc.edu
Wed Aug 11 19:51:48 PDT 2004



Changes in directory llvm/lib/Target/PowerPC:

PPC64AsmPrinter.cpp updated: 1.2 -> 1.3
---
Log message:

Eliminate special-casing 14-bit immediate load/store opcodes


---
Diffs of the changes:  (+5 -16)

Index: llvm/lib/Target/PowerPC/PPC64AsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPC64AsmPrinter.cpp:1.2 llvm/lib/Target/PowerPC/PPC64AsmPrinter.cpp:1.3
--- llvm/lib/Target/PowerPC/PPC64AsmPrinter.cpp:1.2	Wed Aug 11 20:01:13 2004
+++ llvm/lib/Target/PowerPC/PPC64AsmPrinter.cpp	Wed Aug 11 21:51:38 2004
@@ -570,8 +570,11 @@
   }
 
   O << TII.getName(Opcode) << " ";
-  if (Opcode == PPC::LD || Opcode == PPC::LWA || 
-      Opcode == PPC::STDU || Opcode == PPC::STDUX) {
+  if (Opcode == PPC::BLR || Opcode == PPC::NOP) {
+    // FIXME: BuildMI() should handle 0 params
+    O << "\n";
+  } else if (ArgCount == 3 && 
+             (ArgType[1] == PPCII::Disimm16 || ArgType[1] == PPCII::Disimm14)) {
     printOp(MI->getOperand(0));
     O << ", ";
     MachineOperand MO = MI->getOperand(1);
@@ -582,20 +585,6 @@
     O << "(";
     printOp(MI->getOperand(2));
     O << ")\n";
-  } else if (Opcode == PPC::BLR || Opcode == PPC::NOP) {
-    // FIXME: BuildMI() should handle 0 params
-    O << "\n";
-  } else if (ArgCount == 3 && ArgType[1] == PPCII::Disimm16) {
-    printOp(MI->getOperand(0));
-    O << ", ";
-    printImmOp(MI->getOperand(1), ArgType[1]);
-    O << "(";
-    if (MI->getOperand(2).hasAllocatedReg() &&
-        MI->getOperand(2).getReg() == PPC::R0)
-      O << "0";
-    else
-      printOp(MI->getOperand(2));
-    O << ")\n";
   } else {
     for (i = 0; i < ArgCount; ++i) {
       // addi and friends






More information about the llvm-commits mailing list