summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-09-13 17:59:19 +0000
committerOwen Anderson <resistor@mac.com>2011-09-13 17:59:19 +0000
commit44ae2da4ece65e071ac80d935deafc71ad6425f1 (patch)
tree6929f97285cdd895f02d36db9ce020132a1151f6 /llvm/lib
parent2cb4e3c554d1b0a3da3198a0b06fc81a230d83e8 (diff)
downloadbcm5719-llvm-44ae2da4ece65e071ac80d935deafc71ad6425f1.tar.gz
bcm5719-llvm-44ae2da4ece65e071ac80d935deafc71ad6425f1.zip
Teach the Thumb ASM parser that BKPT is allowed in IT blocks, even though it is always executed unconditionally.
llvm-svn: 139610
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index df5e0c9cdee..08a42f12483 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -3532,7 +3532,10 @@ validateInstruction(MCInst &Inst,
MCInstrDesc &MCID = getInstDesc(Inst.getOpcode());
SMLoc Loc = Operands[0]->getStartLoc();
// Check the IT block state first.
- if (inITBlock()) {
+ // NOTE: In Thumb mode, the BKPT instruction has the interesting property of
+ // being allowed in IT blocks, but not being predicable. It just always
+ // executes.
+ if (inITBlock() && Inst.getOpcode() != ARM::tBKPT) {
unsigned bit = 1;
if (ITState.FirstCond)
ITState.FirstCond = false;
OpenPOWER on IntegriCloud