summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-02-23 21:24:25 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-02-23 21:24:25 +0000
commitd88d96cac91bea19f4a622c29d1430ed9d416797 (patch)
treefc32f84b4944e6f0838c61cdb4ba125ad16f72bb /lldb/source/Plugins/Process
parent36079898473324a6a6cd1465ee4ca59b5eec4105 (diff)
downloadbcm5719-llvm-d88d96cac91bea19f4a622c29d1430ed9d416797.tar.gz
bcm5719-llvm-d88d96cac91bea19f4a622c29d1430ed9d416797.zip
Add emulation for "ADR" operations. Add a ThumbImm8Scaled() convenience function
and rename the original ThumbImmScaled() function to ThumbImm7Scaled(). llvm-svn: 126335
Diffstat (limited to 'lldb/source/Plugins/Process')
-rw-r--r--lldb/source/Plugins/Process/Utility/ARMUtils.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Utility/ARMUtils.h b/lldb/source/Plugins/Process/Utility/ARMUtils.h
index 093fe3bbf85..7b614d876ad 100644
--- a/lldb/source/Plugins/Process/Utility/ARMUtils.h
+++ b/lldb/source/Plugins/Process/Utility/ARMUtils.h
@@ -314,12 +314,19 @@ static inline uint32_t ThumbImm12(uint32_t opcode)
}
// imm32 = ZeroExtend(imm7:'00', 32)
-static inline uint32_t ThumbImmScaled(uint32_t opcode)
+static inline uint32_t ThumbImm7Scaled(uint32_t opcode)
{
const uint32_t imm7 = bits(opcode, 6, 0);
return imm7 * 4;
}
+// imm32 = ZeroExtend(imm8:'00', 32)
+static inline uint32_t ThumbImm8Scaled(uint32_t opcode)
+{
+ const uint32_t imm8 = bits(opcode, 7, 0);
+ return imm8 * 4;
+}
+
// This function performs the check for the register numbers 13 and 15 that are
// not permitted for many Thumb register specifiers.
static inline bool BadReg(uint32_t n) { return n == 13 || n == 15; }
OpenPOWER on IntegriCloud