summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commitf0269b42705a1c4281c30f1c01bcffa40eef7003 (patch)
tree6e3b2929e30335a4c63a8bf4f4227b742b0e0839 /llvm/lib
parent6bbe1f0d1065b91c08cb6bb882046930cdb1b684 (diff)
downloadbcm5719-llvm-f0269b42705a1c4281c30f1c01bcffa40eef7003.tar.gz
bcm5719-llvm-f0269b42705a1c4281c30f1c01bcffa40eef7003.zip
Change ARMInstPrinter::printPredicateOperand() so it will not abort if it
runs into the undefined 15 condition code value. llvm-svn: 151844
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
index a821192607a..b0b1dbbefa9 100644
--- a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud