From: Brian Gaeke Date: Thu, 17 Jun 2004 22:34:19 +0000 (+0000) Subject: Emit stores correctly; don't fail an assertion. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8308d04dbcbd6e709ed49a7035203eabfd1ebb44;p=oota-llvm.git 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/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp index 0a5035eb75b..e40ba75326b 100644 --- a/lib/Target/Sparc/SparcAsmPrinter.cpp +++ b/lib/Target/Sparc/SparcAsmPrinter.cpp @@ -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; } diff --git a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp index 0a5035eb75b..e40ba75326b 100644 --- a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp +++ b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp @@ -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; }