diff options
| author | Jacques Pienaar <jpienaar@google.com> | 2016-05-20 21:41:53 +0000 |
|---|---|---|
| committer | Jacques Pienaar <jpienaar@google.com> | 2016-05-20 21:41:53 +0000 |
| commit | 5ffdef55f0a8f6dde3816afb164da22997f6fa65 (patch) | |
| tree | 36d4dbe927386cf208328e65c15f339e167032f0 /llvm/lib/Target/Lanai/InstPrinter/LanaiInstPrinter.cpp | |
| parent | f57a5905d37488111fef9c048e538a00df6ad1e9 (diff) | |
| download | bcm5719-llvm-5ffdef55f0a8f6dde3816afb164da22997f6fa65.tar.gz bcm5719-llvm-5ffdef55f0a8f6dde3816afb164da22997f6fa65.zip | |
[lanai] Change reloc to use PIC_ by default and cleanup.
* Change reloc to PIC_;
* Cleanup (clang-format & modify test);
llvm-svn: 270282
Diffstat (limited to 'llvm/lib/Target/Lanai/InstPrinter/LanaiInstPrinter.cpp')
| -rw-r--r-- | llvm/lib/Target/Lanai/InstPrinter/LanaiInstPrinter.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/llvm/lib/Target/Lanai/InstPrinter/LanaiInstPrinter.cpp b/llvm/lib/Target/Lanai/InstPrinter/LanaiInstPrinter.cpp index 2185517e499..4a1dcd881b5 100644 --- a/llvm/lib/Target/Lanai/InstPrinter/LanaiInstPrinter.cpp +++ b/llvm/lib/Target/Lanai/InstPrinter/LanaiInstPrinter.cpp @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#include "Lanai.h" #include "LanaiInstPrinter.h" +#include "Lanai.h" #include "MCTargetDesc/LanaiMCExpr.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCExpr.h" @@ -138,7 +138,8 @@ bool LanaiInstPrinter::printAlias(const MCInst *MI, raw_ostream &OS) { void LanaiInstPrinter::printInst(const MCInst *MI, raw_ostream &OS, StringRef Annotation, const MCSubtargetInfo &STI) { - if (!printAlias(MI, OS) && !printAliasInstr(MI, OS)) printInstruction(MI, OS); + if (!printAlias(MI, OS) && !printAliasInstr(MI, OS)) + printInstruction(MI, OS); printAnnotation(OS, Annotation); } @@ -210,9 +211,11 @@ static void printMemoryBaseRegister(raw_ostream &OS, const unsigned AluCode, const MCOperand &RegOp) { assert(RegOp.isReg() && "Register operand expected"); OS << "["; - if (LPAC::isPreOp(AluCode)) OS << "*"; + if (LPAC::isPreOp(AluCode)) + OS << "*"; OS << "%" << LanaiInstPrinter::getRegisterName(RegOp.getReg()); - if (LPAC::isPostOp(AluCode)) OS << "*"; + if (LPAC::isPostOp(AluCode)) + OS << "*"; OS << "]"; } @@ -254,9 +257,11 @@ void LanaiInstPrinter::printMemRrOperand(const MCInst *MI, int OpNo, // [ Base OP Offset ] OS << "["; - if (LPAC::isPreOp(AluCode)) OS << "*"; + if (LPAC::isPreOp(AluCode)) + OS << "*"; OS << "%" << getRegisterName(RegOp.getReg()); - if (LPAC::isPostOp(AluCode)) OS << "*"; + if (LPAC::isPostOp(AluCode)) + OS << "*"; OS << " " << LPAC::lanaiAluCodeToString(AluCode) << " "; OS << "%" << getRegisterName(OffsetOp.getReg()); OS << "]"; |

