diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-03-28 18:41:58 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-03-28 18:41:58 +0000 |
commit | d560a809251e54d7802728b9128dfd3b46f29b81 (patch) | |
tree | 124d0025375040712d7e81af2bf32b7058d66826 /lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h | |
parent | 93f79364351650b58172522ae8346153a3c67a5c (diff) |
Fix ARM disassembly for PLD/PLDW/PLI which suffers from code rot and add some test cases.
Add comments to ThumbDisassemblerCore.h for recent change made for t2PLD disassembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128417 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h')
-rw-r--r-- | lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h b/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h index ac6eb67579..066a8e3178 100644 --- a/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h +++ b/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h @@ -1799,8 +1799,12 @@ static bool DisassembleThumb2PreLoad(MCInst &MI, unsigned Opcode, uint32_t insn, // A8.6.117 Encoding T2: add = FALSE unsigned Imm8 = getImm8(insn); Offset = -1 * Imm8; - } else // The i12 forms. See, for example, A8.6.117 Encoding T1. + } else { + // The i12 forms. See, for example, A8.6.117 Encoding T1. + // Note that currently t2PLDi12 also handles the previously named t2PLDpci + // opcode, that's why we use decodeImm12(insn) which returns +/- imm12. Offset = decodeImm12(insn); + } MI.addOperand(MCOperand::CreateImm(Offset)); } ++OpIdx; |