mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-03 11:24:18 +00:00
Print out a debug message when the reglist fails the sanity check for Thumb Ld/St Multiple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129365 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -139,6 +139,31 @@ static inline void setSlice(unsigned &Bits, unsigned From, unsigned To,
|
||||
Bits |= (Val & Mask) << To;
|
||||
}
|
||||
|
||||
// Return an integer result equal to the number of bits of x that are ones.
|
||||
static inline uint32_t
|
||||
BitCount (uint64_t x)
|
||||
{
|
||||
// c accumulates the total bits set in x
|
||||
uint32_t c;
|
||||
for (c = 0; x; ++c)
|
||||
{
|
||||
x &= x - 1; // clear the least significant bit set
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
BitIsSet (const uint64_t value, const uint64_t bit)
|
||||
{
|
||||
return (value & (1ull << bit)) != 0;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
BitIsClear (const uint64_t value, const uint64_t bit)
|
||||
{
|
||||
return (value & (1ull << bit)) == 0;
|
||||
}
|
||||
|
||||
/// Various utilities for checking the target specific flags.
|
||||
|
||||
/// A unary data processing instruction doesn't have an Rn operand.
|
||||
|
Reference in New Issue
Block a user