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 | b3bfad0830b03ebf41d18f894c34fbef312dba72 (patch) | |
tree | 656d3480716fc230b9cb52149e917aee483790bc /lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp | |
parent | 7c08660fcd4e5e6c331f2a40b60fc6632aa669c3 (diff) | |
download | external_llvm-b3bfad0830b03ebf41d18f894c34fbef312dba72.tar.gz external_llvm-b3bfad0830b03ebf41d18f894c34fbef312dba72.tar.bz2 external_llvm-b3bfad0830b03ebf41d18f894c34fbef312dba72.zip |
Hook up verbose asm comment printing for SOImm operands in MC printer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114215 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp')
-rw-r--r-- | lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp index 2e48905791..4969d7ccb3 100644 --- a/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp +++ b/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' |