summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-04-12 21:41:51 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-04-12 21:41:51 +0000
commit960eef3db3db636c2d1f1f893985e7fa47405919 (patch)
tree171cd402d8066914da13e33acd2896a5be5e3099 /llvm/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
parentc49df2c05aac6df2aa3ee69c9fb2b1b22d29743c (diff)
downloadbcm5719-llvm-960eef3db3db636c2d1f1f893985e7fa47405919.tar.gz
bcm5719-llvm-960eef3db3db636c2d1f1f893985e7fa47405919.zip
The Thumb2 RFE instructions need to have their second halfword fully specified.
In addition, the base register is not rGPR, but GPR with th exception that: if n == 15 then UNPREDICTABLE rdar://problem/9273836 llvm-svn: 129391
Diffstat (limited to 'llvm/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h')
-rw-r--r--llvm/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h b/llvm/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
index 3d2d1ab947f..e29d84604ec 100644
--- a/llvm/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
+++ b/llvm/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
@@ -1142,8 +1142,12 @@ static bool DisassembleThumb2SRS(MCInst &MI, unsigned Opcode, uint32_t insn,
// t2RFE[IA|DB]W/t2RFE[IA|DB]: Rn
static bool DisassembleThumb2RFE(MCInst &MI, unsigned Opcode, uint32_t insn,
unsigned short NumOps, unsigned &NumOpsAdded, BO B) {
- MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID,
- decodeRn(insn))));
+ unsigned Rn = decodeRn(insn);
+ if (Rn == 15) {
+ DEBUG(errs() << "if n == 15 then UNPREDICTABLE\n");
+ return false;
+ }
+ MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B,ARM::GPRRegClassID,Rn)));
NumOpsAdded = 1;
return true;
}
OpenPOWER on IntegriCloud