diff options
author | Fangrui Song <maskray@google.com> | 2020-03-26 23:40:23 -0700 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2020-03-31 15:05:38 -0700 |
commit | 4af7560b3751259c4acf63411f42ab5c9989ef26 (patch) | |
tree | 7b2746d1148a48804d56469b8c20bd9fe68e668a /llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp | |
parent | c9d65a48af1d7bbfed7e785613cc9d9acf71821b (diff) | |
download | llvm-4af7560b3751259c4acf63411f42ab5c9989ef26.zip llvm-4af7560b3751259c4acf63411f42ab5c9989ef26.tar.gz llvm-4af7560b3751259c4acf63411f42ab5c9989ef26.tar.bz2 |
[PPCInstPrinter] Print conditional branches as `bt 2, $target` instead of `bt 2, .+$imm`
Follow-up of D76591.
Reviewed By: #powerpc, sfertile
Differential Revision: https://reviews.llvm.org/D76907
Diffstat (limited to 'llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp b/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp index 49c2790..d6e0bc2 100644 --- a/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp +++ b/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp @@ -60,6 +60,13 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCDisassembler() { createPPCLEDisassembler); } +static DecodeStatus decodeCondBrTarget(MCInst &Inst, unsigned Imm, + uint64_t /*Address*/, + const void * /*Decoder*/) { + Inst.addOperand(MCOperand::createImm(SignExtend32<14>(Imm))); + return MCDisassembler::Success; +} + static DecodeStatus DecodePCRel24BranchTarget(MCInst &Inst, unsigned Imm, uint64_t Addr, const void *Decoder) { |