diff options
author | Akira Hatanaka <ahatanak@gmail.com> | 2011-07-07 20:54:20 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanak@gmail.com> | 2011-07-07 20:54:20 +0000 |
commit | 03236be44af1d98eb8daa57e8eb8b7bdd7884523 (patch) | |
tree | 4610525fccaecdf3403da1a2714909083a24a29a /lib/Target/Mips/MipsAsmPrinter.cpp | |
parent | 3014b2f3228e1aac1a70598f50d66f1afcc16714 (diff) | |
download | llvm-03236be44af1d98eb8daa57e8eb8b7bdd7884523.tar.gz llvm-03236be44af1d98eb8daa57e8eb8b7bdd7884523.tar.bz2 llvm-03236be44af1d98eb8daa57e8eb8b7bdd7884523.tar.xz |
Rather than having printMemOperand change the way memory operands are printed
based on a modifier, split it into two functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134637 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsAsmPrinter.cpp')
-rw-r--r-- | lib/Target/Mips/MipsAsmPrinter.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/Target/Mips/MipsAsmPrinter.cpp b/lib/Target/Mips/MipsAsmPrinter.cpp index 74365b8149..95114363c9 100644 --- a/lib/Target/Mips/MipsAsmPrinter.cpp +++ b/lib/Target/Mips/MipsAsmPrinter.cpp @@ -359,17 +359,7 @@ void MipsAsmPrinter::printUnsignedImm(const MachineInstr *MI, int opNum, } void MipsAsmPrinter:: -printMemOperand(const MachineInstr *MI, int opNum, raw_ostream &O, - const char *Modifier) { - // 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, O); - O << ", "; - printOperand(MI, opNum+1, O); - return; - } - +printMemOperand(const MachineInstr *MI, int opNum, raw_ostream &O) { // Load/Store memory operands -- imm($reg) // If PIC target the target is loaded as the // pattern lw $25,%call16($28) @@ -380,6 +370,16 @@ printMemOperand(const MachineInstr *MI, int opNum, raw_ostream &O, } void MipsAsmPrinter:: +printMemOperandEA(const MachineInstr *MI, int opNum, raw_ostream &O) { + // when using stack locations for not load/store instructions + // print the same way as all normal 3 operand instructions. + printOperand(MI, opNum, O); + O << ", "; + printOperand(MI, opNum+1, O); + return; +} + +void MipsAsmPrinter:: printFCCOperand(const MachineInstr *MI, int opNum, raw_ostream &O, const char *Modifier) { const MachineOperand& MO = MI->getOperand(opNum); |