diff options
author | Tim Northover <tnorthover@apple.com> | 2014-05-12 18:04:06 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-05-12 18:04:06 +0000 |
commit | d6cd0381f676a6eb27d8b3b2aed70eed5fcb439d (patch) | |
tree | 34b8228b1fac3a8ba1810b8cfe9edd1f75263dfd /lib/Target/AArch64/InstPrinter | |
parent | 2161fd6114b99ab3cf371b4289beb130f591b4ef (diff) | |
download | llvm-d6cd0381f676a6eb27d8b3b2aed70eed5fcb439d.tar.gz llvm-d6cd0381f676a6eb27d8b3b2aed70eed5fcb439d.tar.bz2 llvm-d6cd0381f676a6eb27d8b3b2aed70eed5fcb439d.tar.xz |
TableGen: use PrintMethods to print more aliases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/InstPrinter')
-rw-r--r-- | lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp | 9 | ||||
-rw-r--r-- | lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp b/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp index 032120771a..d9571238a0 100644 --- a/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp +++ b/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp @@ -210,6 +210,15 @@ AArch64InstPrinter::printCondCodeOperand(const MCInst *MI, unsigned OpNum, O << A64CondCodeToString(static_cast<A64CC::CondCodes>(MO.getImm())); } +void +AArch64InstPrinter::printInverseCondCodeOperand(const MCInst *MI, + unsigned OpNum, + raw_ostream &O) { + A64CC::CondCodes CC = + static_cast<A64CC::CondCodes>(MI->getOperand(OpNum).getImm()); + O << A64CondCodeToString(A64InvertCondCode(CC)); +} + template <unsigned field_width, unsigned scale> void AArch64InstPrinter::printLabelOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O) { diff --git a/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h b/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h index a0319a95ef..7432755dd8 100644 --- a/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h +++ b/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h @@ -31,6 +31,8 @@ public: // Autogenerated by tblgen void printInstruction(const MCInst *MI, raw_ostream &O); bool printAliasInstr(const MCInst *MI, raw_ostream &O); + void printCustomAliasOperand(const MCInst *MI, unsigned OpIdx, + unsigned PrintMethodIdx, raw_ostream &O); static const char *getRegisterName(unsigned RegNo); static const char *getInstructionName(unsigned Opcode); @@ -62,6 +64,8 @@ public: void printCondCodeOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O); + void printInverseCondCodeOperand(const MCInst *MI, unsigned OpNum, + raw_ostream &O); void printCRxOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O); |