diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-08-03 23:50:40 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-08-03 23:50:40 +0000 |
commit | 7ce057983ea7b8ad42d5cca1bb5d3f6941662269 (patch) | |
tree | 54a731f5142d082ed12dd47c2c4625ed0eb68619 /lib/Target/ARM/Disassembler/ARMDisassembler.cpp | |
parent | 762797d1af1b9308c79982aedd9bd2f585f46171 (diff) |
ARM refactoring assembly parsing of memory address operands.
Memory operand parsing is a bit haphazzard at the moment, in no small part
due to the even more haphazzard representations of memory operands in the .td
files. Start cleaning that all up, at least a bit.
The addressing modes in the .td files will be being simplified to not be
so monolithic, especially with regards to immediate vs. register offsets
and post-indexed addressing. addrmode3 is on its way with this patch, for
example.
This patch is foundational to enable going back to smaller incremental patches
for the individual memory referencing instructions themselves. It does just
enough to get the basics in place and handle the "make check" regression tests
we already have.
Follow-up work will be fleshing out the details and adding more robust test
cases for the individual instructions, starting with ARM mode and moving from
there into Thumb and Thumb2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/Disassembler/ARMDisassembler.cpp')
-rw-r--r-- | lib/Target/ARM/Disassembler/ARMDisassembler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/ARM/Disassembler/ARMDisassembler.cpp b/lib/Target/ARM/Disassembler/ARMDisassembler.cpp index bdce2c4cf8..c89e3e8a8f 100644 --- a/lib/Target/ARM/Disassembler/ARMDisassembler.cpp +++ b/lib/Target/ARM/Disassembler/ARMDisassembler.cpp @@ -127,7 +127,7 @@ static unsigned decodeARMInstruction(uint32_t &insn) { case 2: switch (slice(insn, 7, 4)) { case 11: - return ARM::STRHT; + return slice(insn, 22, 22) ? ARM::STRHTi : ARM::STRHTr; default: break; // fallthrough } @@ -135,11 +135,11 @@ static unsigned decodeARMInstruction(uint32_t &insn) { case 3: switch (slice(insn, 7, 4)) { case 11: - return ARM::LDRHT; + return slice(insn, 22, 22) ? ARM::LDRHTi : ARM::LDRHTr; case 13: - return ARM::LDRSBT; + return slice(insn, 22, 22) ? ARM::LDRSBTi : ARM::LDRSBTr; case 15: - return ARM::LDRSHT; + return slice(insn, 22, 22) ? ARM::LDRSHTi : ARM::LDRSHTr; default: break; // fallthrough } |