diff options
author | Hal Finkel <hfinkel@anl.gov> | 2016-09-02 23:41:54 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2016-09-02 23:41:54 +0000 |
commit | 277736eee618be1426034c7dee01b7fbad15d7f7 (patch) | |
tree | e5cf5ebd4ccfdc8444af576a7db54230cf045de4 /llvm/lib/Target/PowerPC/InstPrinter | |
parent | 66c6506aaca087f2c5813f50ebe3e6956c24b841 (diff) | |
download | bcm5719-llvm-277736eee618be1426034c7dee01b7fbad15d7f7.tar.gz bcm5719-llvm-277736eee618be1426034c7dee01b7fbad15d7f7.zip |
[PowerPC] Add support for the extended dcbf form and mnemonics
dcbf has an optional hint-like field, add support for the extended form and the
associated mnemonics (dcbfl and dcbflp).
Partially fixes PR24796.
llvm-svn: 280559
Diffstat (limited to 'llvm/lib/Target/PowerPC/InstPrinter')
-rw-r--r-- | llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp b/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp index d9d9b4f180f..d1c4b59e559 100644 --- a/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp +++ b/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp @@ -135,6 +135,25 @@ void PPCInstPrinter::printInst(const MCInst *MI, raw_ostream &O, printAnnotation(O, Annot); return; } + + if (MI->getOpcode() == PPC::DCBF) { + unsigned char L = MI->getOperand(0).getImm(); + if (!L || L == 1 || L == 3) { + O << "\tdcbf"; + if (L == 1 || L == 3) + O << "l"; + if (L == 3) + O << "p"; + O << " "; + + printOperand(MI, 1, O); + O << ", "; + printOperand(MI, 2, O); + + printAnnotation(O, Annot); + return; + } + } if (!printAliasInstr(MI, O)) printInstruction(MI, O); |