summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
diff options
context:
space:
mode:
authorRichard Barton <richard.barton@arm.com>2012-04-27 08:42:59 +0000
committerRichard Barton <richard.barton@arm.com>2012-04-27 08:42:59 +0000
commitf435b09eafe1a051608b67facd1dd42d1a9760e1 (patch)
treeeceb7ea468c95903d2e9dd316c74cb435e8f2f4c /llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
parent6008dfdb70f3a13b56a5c4ff60bd54435f92b135 (diff)
downloadbcm5719-llvm-f435b09eafe1a051608b67facd1dd42d1a9760e1.tar.gz
bcm5719-llvm-f435b09eafe1a051608b67facd1dd42d1a9760e1.zip
Refactor IT handling not to store the bottom bit of the condition code in the mask operand in the MCInst.
llvm-svn: 155700
Diffstat (limited to 'llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp')
-rw-r--r--llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
index cbd81c11a45..34a76b27ea5 100644
--- a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
+++ b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
@@ -754,7 +754,8 @@ void ARMInstPrinter::printThumbITMask(const MCInst *MI, unsigned OpNum,
raw_ostream &O) {
// (3 - the number of trailing zeros) is the number of then / else.
unsigned Mask = MI->getOperand(OpNum).getImm();
- unsigned CondBit0 = Mask >> 4 & 1;
+ unsigned Firstcond = MI->getOperand(OpNum-1).getImm();
+ unsigned CondBit0 = Firstcond & 1;
unsigned NumTZ = CountTrailingZeros_32(Mask);
assert(NumTZ <= 3 && "Invalid IT mask!");
for (unsigned Pos = 3, e = NumTZ; Pos > e; --Pos) {
OpenPOWER on IntegriCloud