diff options
| author | 2019-09-01 16:27:59 +0000 | |
|---|---|---|
| committer | 2019-09-01 16:27:59 +0000 | |
| commit | b19884b112052f3bf5ff9551374fbd840e2339f2 (patch) | |
| tree | 9e4127bb2a982bb6f8c89d0d7b393e3fac3aee2c /gnu/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp | |
| parent | Add amlmmc(4), a driver for the SD/MMC controller found on various (diff) | |
| download | wireguard-openbsd-b19884b112052f3bf5ff9551374fbd840e2339f2.tar.xz wireguard-openbsd-b19884b112052f3bf5ff9551374fbd840e2339f2.zip | |
Import LLVM 8.0.1 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp')
| -rw-r--r-- | gnu/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp b/gnu/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp index fc29e4effbb..6824168b890 100644 --- a/gnu/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp +++ b/gnu/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp @@ -382,8 +382,11 @@ void PPCInstPrinter::printBranchOperand(const MCInst *MI, unsigned OpNo, // Branches can take an immediate operand. This is used by the branch // selection pass to print .+8, an eight byte displacement from the PC. - O << ".+"; - printAbsBranchOperand(MI, OpNo, O); + O << "."; + int32_t Imm = SignExtend32<32>((unsigned)MI->getOperand(OpNo).getImm() << 2); + if (Imm >= 0) + O << "+"; + O << Imm; } void PPCInstPrinter::printAbsBranchOperand(const MCInst *MI, unsigned OpNo, |
