summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-03-16 16:36:54 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-03-16 16:36:54 +0000
commit3d9327bd06e88c81174776276eadb7fb41cbb3dd (patch)
treee98deaba25b2089f0b32abb4d3fafa09a3b10de0 /llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
parent5712ebced0bed58724c257c36d5ef0451254ef8c (diff)
downloadbcm5719-llvm-3d9327bd06e88c81174776276eadb7fb41cbb3dd.tar.gz
bcm5719-llvm-3d9327bd06e88c81174776276eadb7fb41cbb3dd.zip
Initial ARM/Thumb disassembler check-in. It consists of a tablgen backend
(RISCDisassemblerEmitter) which emits the decoder functions for ARM and Thumb, and the disassembler core which invokes the decoder function and builds up the MCInst based on the decoded Opcode. Added sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrm instructions to help disassembly. We also changed the output of the addressing modes to omit the '+' from the assembler syntax #+/-<imm> or +/-<Rm>. See, for example, A8.6.57/58/60. And modified test cases to not expect '+' in +reg or #+num. For example, ; CHECK: ldr.w r9, [r7, #28] llvm-svn: 98637
Diffstat (limited to 'llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp')
-rw-r--r--llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp b/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
index f5ba155f402..f36d4ef7567 100644
--- a/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
+++ b/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
@@ -78,14 +78,16 @@ bool Thumb2ITBlockPass::InsertITBlocks(MachineBasicBlock &MBB) {
DebugLoc ndl = NMI->getDebugLoc();
unsigned NPredReg = 0;
ARMCC::CondCodes NCC = getPredicate(NMI, NPredReg);
- if (NCC == OCC) {
- Mask |= (1 << Pos);
- } else if (NCC != CC)
+ if (NCC == CC || NCC == OCC)
+ Mask |= (NCC & 1) << Pos;
+ else
break;
--Pos;
++MBBI;
}
Mask |= (1 << Pos);
+ // Tag along (firstcond[0] << 4) with the mask.
+ Mask |= (CC & 1) << 4;
MIB.addImm(Mask);
Modified = true;
++NumITs;
OpenPOWER on IntegriCloud