From 6d5ada23db825cc73f086c73a95b0ef9fb6cf2fa Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Mon, 24 Sep 2007 20:15:11 +0000 Subject: Added "LoadEffective" pattern to handle stack locations. Fixed some comments llvm-svn: 42271 --- llvm/lib/Target/Mips/MipsAsmPrinter.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Target/Mips/MipsAsmPrinter.cpp') diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp index 11db54753c1..254cc563c9c 100644 --- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp +++ b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp @@ -141,7 +141,7 @@ emitMaskDirective(MachineFunction &MF) #endif unsigned int Bitmask = getSavedRegsBitmask(false, MF); - O << "\t.mask\t"; + O << "\t.mask \t"; printHex32(Bitmask); O << "," << Offset << "\n"; } @@ -366,9 +366,16 @@ printOperand(const MachineInstr *MI, int opNum) void MipsAsmPrinter:: printMemOperand(const MachineInstr *MI, int opNum, const char *Modifier) { - // lw/sw $reg, MemOperand - // will turn into : - // lw/sw $reg, imm($reg) + // when using stack locations for not load/store instructions + // print the same way as all normal 3 operand instructions. + if (Modifier && !strcmp(Modifier, "stackloc")) { + printOperand(MI, opNum+1); + O << ", "; + printOperand(MI, opNum); + return; + } + + // Load/Store memory operands -- imm($reg) printOperand(MI, opNum); O << "("; printOperand(MI, opNum+1); -- cgit v1.2.3