Emit stores correctly; don't fail an assertion.
authorBrian Gaeke <gaeke@uiuc.edu>
Thu, 17 Jun 2004 22:34:19 +0000 (22:34 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Thu, 17 Jun 2004 22:34:19 +0000 (22:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14209 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/SparcAsmPrinter.cpp
lib/Target/SparcV8/SparcV8AsmPrinter.cpp

index 0a5035eb75b0461895c6ef58b30c5a7ff6eb7bf9..e40ba75326b161b07ac453a75c5bce14e4aec0e8 100644 (file)
@@ -479,7 +479,7 @@ void V8Printer::printMachineInstruction(const MachineInstr *MI) {
   
   // Printing memory instructions is a special case.
   // for loads:  %dest = op %base, offset --> op [%base + offset], %dest
-  // for stores: op %src, %base, offset   --> op %src, [%base + offset]
+  // for stores: op %base, offset, %src   --> op %src, [%base + offset]
   if (isLoadInstruction (MI)) {
     printBaseOffsetPair (MI, 1);
     O << ", ";
@@ -487,9 +487,9 @@ void V8Printer::printMachineInstruction(const MachineInstr *MI) {
     O << "\n";
     return;
   } else if (isStoreInstruction (MI)) {
-    printOperand (MI, 0);
+    printOperand (MI, 2);
     O << ", ";
-    printBaseOffsetPair (MI, 1);
+    printBaseOffsetPair (MI, 0);
     O << "\n";
     return;
   }
index 0a5035eb75b0461895c6ef58b30c5a7ff6eb7bf9..e40ba75326b161b07ac453a75c5bce14e4aec0e8 100644 (file)
@@ -479,7 +479,7 @@ void V8Printer::printMachineInstruction(const MachineInstr *MI) {
   
   // Printing memory instructions is a special case.
   // for loads:  %dest = op %base, offset --> op [%base + offset], %dest
-  // for stores: op %src, %base, offset   --> op %src, [%base + offset]
+  // for stores: op %base, offset, %src   --> op %src, [%base + offset]
   if (isLoadInstruction (MI)) {
     printBaseOffsetPair (MI, 1);
     O << ", ";
@@ -487,9 +487,9 @@ void V8Printer::printMachineInstruction(const MachineInstr *MI) {
     O << "\n";
     return;
   } else if (isStoreInstruction (MI)) {
-    printOperand (MI, 0);
+    printOperand (MI, 2);
     O << ", ";
-    printBaseOffsetPair (MI, 1);
+    printBaseOffsetPair (MI, 0);
     O << "\n";
     return;
   }