14template <
typename Derived,
typename AddressType>
20template <
typename Derived,
typename AddressType>
24 AddressType Mask = Derived::getAlignmentMask(
Length);
25 return (
Length + ~Mask) & Mask;
28template <
typename AddressType,
unsigned MW,
unsigned MAX_E>
31 static constexpr unsigned int IE_TAKE_BITS = 3;
41 bool IE = (
E != 0) || ((
static_cast<uint64_t>(
Length) >> (MW - 2)) & 1);
43 unsigned int Eprime = IE ? (
E + IE_TAKE_BITS) : 0;
45 assert(
E <= MAX_E &&
"Raw exponent exceeds architecture maximum");
46 assert(Eprime <=
sizeof(AddressType) * 8 &&
47 "Shift amount exceeds integer width");
62 constexpr uint32_t NINE_SET_BITS = 511;
64 if (
Length > NINE_SET_BITS << 14)
68 if (
Length > NINE_SET_BITS <<
E)
70 assert(
E <= 14 &&
"CHERIoT capabilities cannot encode E between 14 and 24");
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file implements the C++20 <bit> header.
This is an optimization pass for GlobalISel generic memory operations.
int countl_zero(T Val)
Count number of 0's from the most significant bit to the least stopping at the first 1.
This struct is a compact representation of a valid (non-zero power of two) alignment.