diff options
author | Caroline Tice <ctice@apple.com> | 2011-03-31 03:26:23 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2011-03-31 03:26:23 +0000 |
commit | b5c6a3e50a0375fe0493ec801c74abdedcebb5d9 (patch) | |
tree | 8633f68a2e9b83aca1cf3bb1de0489f2a684c8be /lldb/source/Plugins/Process/Utility/InstructionUtils.h | |
parent | 730648707718eefd19d77d3679d6e788e4b20100 (diff) | |
download | bcm5719-llvm-b5c6a3e50a0375fe0493ec801c74abdedcebb5d9.tar.gz bcm5719-llvm-b5c6a3e50a0375fe0493ec801c74abdedcebb5d9.zip |
Add "Bits64" utility function.
Add code to emulate VSTM ARM instruction (store multiple floating point registers).
llvm-svn: 128609
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/InstructionUtils.h')
-rw-r--r-- | lldb/source/Plugins/Process/Utility/InstructionUtils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Utility/InstructionUtils.h b/lldb/source/Plugins/Process/Utility/InstructionUtils.h index 1bbfad8a93e..c03b63e7644 100644 --- a/lldb/source/Plugins/Process/Utility/InstructionUtils.h +++ b/lldb/source/Plugins/Process/Utility/InstructionUtils.h @@ -15,6 +15,15 @@ namespace lldb_private { // Return the bit field(s) from the most significant bit (msbit) to the +// least significant bit (lsbit) of a 64-bit unsigned value. +static inline uint64_t +Bits64 (const uint64_t bits, const uint32_t msbit, const uint32_t lsbit) +{ + assert(msbit < 64 && lsbit <= msbit); + return (bits >> lsbit) & ((1u << (msbit - lsbit + 1)) - 1); +} + +// Return the bit field(s) from the most significant bit (msbit) to the // least significant bit (lsbit) of a 32-bit unsigned value. static inline uint32_t Bits32 (const uint32_t bits, const uint32_t msbit, const uint32_t lsbit) |