diff options
| author | Jim Grosbach <grosbach@apple.com> | 2010-09-17 21:33:25 +0000 |
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2010-09-17 21:33:25 +0000 |
| commit | 132a0ce787c66196521d50aa0d57959829972405 (patch) | |
| tree | 546dddc8b80fd892a3452fa4b73eacddc07c4913 /llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp | |
| parent | 4e51d0bebbabaf33be7902e35b03d4b872946210 (diff) | |
| download | bcm5719-llvm-132a0ce787c66196521d50aa0d57959829972405.tar.gz bcm5719-llvm-132a0ce787c66196521d50aa0d57959829972405.zip | |
Hook up verbose asm comment printing for SOImm operands in MC printer
llvm-svn: 114215
Diffstat (limited to 'llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp b/llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp index 2e48905791c..4969d7ccb3f 100644 --- a/llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp +++ b/llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp @@ -160,7 +160,7 @@ void ARMInstPrinter::printOperand(const MCInst *MI, unsigned OpNo, } } -static void printSOImm(raw_ostream &O, int64_t V, bool VerboseAsm, +static void printSOImm(raw_ostream &O, int64_t V, raw_ostream *CommentStream, const MCAsmInfo *MAI) { // Break it up into two parts that make up a shifter immediate. V = ARM_AM::getSOImmVal(V); @@ -174,9 +174,8 @@ static void printSOImm(raw_ostream &O, int64_t V, bool VerboseAsm, if (Rot) { O << "#" << Imm << ", " << Rot; // Pretty printed version. - if (VerboseAsm) - O << ' ' << MAI->getCommentString() - << ' ' << (int)ARM_AM::rotr32(Imm, Rot); + if (CommentStream) + *CommentStream << (int)ARM_AM::rotr32(Imm, Rot) << "\n"; } else { O << "#" << Imm; } @@ -189,7 +188,7 @@ void ARMInstPrinter::printSOImmOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O) { const MCOperand &MO = MI->getOperand(OpNum); assert(MO.isImm() && "Not a valid so_imm value!"); - printSOImm(O, MO.getImm(), VerboseAsm, &MAI); + printSOImm(O, MO.getImm(), CommentStream, &MAI); } /// printSOImm2PartOperand - SOImm is broken into two pieces using a 'mov' |

