[Lldb-commits] [lldb] r125313 - /lldb/trunk/source/Plugins/Process/Utility/InstructionUtils.h
Johnny Chen
johnny.chen at apple.com
Thu Feb 10 13:49:16 PST 2011
Author: johnny
Date: Thu Feb 10 15:49:16 2011
New Revision: 125313
URL: http://llvm.org/viewvc/llvm-project?rev=125313&view=rev
Log:
Cleaned up some parameter types and names.
Modified:
lldb/trunk/source/Plugins/Process/Utility/InstructionUtils.h
Modified: lldb/trunk/source/Plugins/Process/Utility/InstructionUtils.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/InstructionUtils.h?rev=125313&r1=125312&r2=125313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/InstructionUtils.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/InstructionUtils.h Thu Feb 10 15:49:16 2011
@@ -15,29 +15,29 @@
namespace lldb_private {
static inline uint32_t
-Bits32 (const uint32_t value, const uint32_t msbit, const uint32_t lsbit)
+Bits32 (const uint32_t bits, const uint32_t msbit, const uint32_t lsbit)
{
assert(msbit < 32 && lsbit <= msbit);
- return (value >> lsbit) & ((1u << (msbit - lsbit + 1)) - 1);
+ return (bits >> lsbit) & ((1u << (msbit - lsbit + 1)) - 1);
}
static inline uint32_t
-Bit32 (const uint32_t value, const uint32_t bit)
+Bit32 (const uint32_t bits, const uint32_t bit)
{
- return Bits32(value, bit, bit);
+ return Bits32(bits, bit, bit);
}
static inline void
-SetBits32(uint32_t &bits, unsigned msbit, unsigned lsbit, unsigned val)
+SetBits32(uint32_t &bits, const uint32_t msbit, const uint32_t lsbit, const uint32_t val)
{
assert(msbit < 32 && lsbit < 32 && msbit >= lsbit);
- uint32_t mask = ((1 << (msbit - lsbit + 1)) - 1);
+ uint32_t mask = ((1u << (msbit - lsbit + 1)) - 1);
bits &= ~(mask << lsbit);
bits |= (val & mask) << lsbit;
}
static inline void
-SetBit32(uint32_t &bits, unsigned bit, unsigned val)
+SetBit32(uint32_t &bits, const uint32_t bit, const uint32_t val)
{
SetBits32(bits, bit, bit, val);
}
More information about the lldb-commits
mailing list