aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-07-26 21:28:43 +0000
committerJim Grosbach <grosbach@apple.com>2011-07-26 21:28:43 +0000
commit85bfd3b023d4d70936006eadd86588b03e5f40c0 (patch)
treee5162686bfeb0e7884b96a6e6f27a2d81d829137 /lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
parent61cc47e15d1899dac5b2633b2e13f9fcd04d3ce9 (diff)
downloadexternal_llvm-85bfd3b023d4d70936006eadd86588b03e5f40c0.tar.gz
external_llvm-85bfd3b023d4d70936006eadd86588b03e5f40c0.tar.bz2
external_llvm-85bfd3b023d4d70936006eadd86588b03e5f40c0.zip
ARM cleanup of rot_imm encoding.
Start of cleaning this up a bit. First step is to remove the encoder hook by storing the operand as the bits it'll actually encode to so it can just be directly used. Map it to the assembly source values 8/16/24 when we print it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136152 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h')
-rw-r--r--lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h b/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
index 694ffe6e99..e534e21375 100644
--- a/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
+++ b/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
@@ -323,12 +323,6 @@ static inline int decodeImm32_BLX(uint32_t insn) {
return SignExtend32<25>(Imm25);
}
-// See, for example, A8.6.221 SXTAB16.
-static inline unsigned decodeRotate(uint32_t insn) {
- unsigned rotate = slice(insn, 5, 4);
- return rotate << 3;
-}
-
///////////////////////////////////////////////
// //
// Thumb1 instruction disassembly functions. //
@@ -2195,7 +2189,7 @@ static bool DisassembleThumb2DPReg(MCInst &MI, unsigned Opcode, uint32_t insn,
if (OpIdx < NumOps && OpInfo[OpIdx].RegClass < 0
&& !OpInfo[OpIdx].isPredicate() && !OpInfo[OpIdx].isOptionalDef()) {
// Add the rotation amount immediate.
- MI.addOperand(MCOperand::CreateImm(decodeRotate(insn)));
+ MI.addOperand(MCOperand::CreateImm(slice(insn, 5, 4)));
++OpIdx;
}