summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/InstPrinter
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2012-03-01 22:13:02 +0000
committerKevin Enderby <enderby@apple.com>2012-03-01 22:13:02 +0000
commitb0578512c79134136e8b53c62a8677ab8e600be2 (patch)
treeace12736bc4e11228659dc5b1306b3f5036070e9 /lib/Target/ARM/InstPrinter
parentdfa27aea12ae1d69a7e94ed5e6df6be1cc90d9e3 (diff)
downloadllvm-b0578512c79134136e8b53c62a8677ab8e600be2.tar.gz
llvm-b0578512c79134136e8b53c62a8677ab8e600be2.tar.bz2
llvm-b0578512c79134136e8b53c62a8677ab8e600be2.tar.xz
Change ARMInstPrinter::printPredicateOperand() so it will not abort if it
runs into the undefined 15 condition code value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151844 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/InstPrinter')
-rw-r--r--lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
index a821192607..b0b1dbbefa 100644
--- a/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
+++ b/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
@@ -692,7 +692,10 @@ void ARMInstPrinter::printMSRMaskOperand(const MCInst *MI, unsigned OpNum,
void ARMInstPrinter::printPredicateOperand(const MCInst *MI, unsigned OpNum,
raw_ostream &O) {
ARMCC::CondCodes CC = (ARMCC::CondCodes)MI->getOperand(OpNum).getImm();
- if (CC != ARMCC::AL)
+ // Handle the undefined 15 CC value here for printing so we don't abort().
+ if ((unsigned)CC == 15)
+ O << "<und>";
+ else if (CC != ARMCC::AL)
O << ARMCondCodeToString(CC);
}