diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2007-09-24 20:15:11 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2007-09-24 20:15:11 +0000 |
commit | 6d5ada23db825cc73f086c73a95b0ef9fb6cf2fa (patch) | |
tree | 079d19d9da9f022ecf6bb3c00b66aa9b96e72e5b /llvm/lib/Target/Mips/MipsAsmPrinter.cpp | |
parent | 9e30e1a3be52ee8a45936442f674556b187b2f24 (diff) | |
download | bcm5719-llvm-6d5ada23db825cc73f086c73a95b0ef9fb6cf2fa.tar.gz bcm5719-llvm-6d5ada23db825cc73f086c73a95b0ef9fb6cf2fa.zip |
Added "LoadEffective" pattern to handle stack locations.
Fixed some comments
llvm-svn: 42271
Diffstat (limited to 'llvm/lib/Target/Mips/MipsAsmPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsAsmPrinter.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
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); |