Emit stores correctly; don't fail an assertion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14209 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp
index 0a5035e..e40ba75 100644
--- a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp
+++ b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp
@@ -479,7 +479,7 @@
   
   // 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 @@
     O << "\n";
     return;
   } else if (isStoreInstruction (MI)) {
-    printOperand (MI, 0);
+    printOperand (MI, 2);
     O << ", ";
-    printBaseOffsetPair (MI, 1);
+    printBaseOffsetPair (MI, 0);
     O << "\n";
     return;
   }