From 8308d04dbcbd6e709ed49a7035203eabfd1ebb44 Mon Sep 17 00:00:00 2001 From: Brian Gaeke Date: Thu, 17 Jun 2004 22:34:19 +0000 Subject: [PATCH] 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 --- lib/Target/Sparc/SparcAsmPrinter.cpp | 6 +++--- lib/Target/SparcV8/SparcV8AsmPrinter.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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; } -- 2.34.1