|
CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
|
A particular Field within a Bitpack. More...
#include <bitpack.hh>

Classes | |
| class | Proxy |
| A proxy for this Field within the Bitpack's Storage. More... | |
Public Types | |
| using | Type = TypeParam |
| Expose the type parameter. | |
| template<bool C, typename T> | |
| using | ConditionalConstRef |
Public Member Functions | |
| template<typename BitpackType> | |
| Proxy (BitpackType &r) -> Proxy< std::remove_cvref_t< BitpackType >, ConditionalConstRef< Info.isConst, decltype((r.value))> > | |
Static Public Member Functions | |
| static constexpr Type | raw_view (Storage storage) |
| Extract a Field from a raw Storage value. | |
| static constexpr Storage | raw_with (Storage lhs, Storage rhs) |
| Compute the underlying Storage transform for a Field update. | |
| static constexpr Storage | raw_with (Storage lhs, Type rhs) |
| Update for fields whose type can be static_cast to Storage. | |
| template<typename OtherStorage> requires requires { sizeof(OtherStorage) < sizeof(Storage); } | |
| static constexpr Storage | raw_with (Storage lhs, Bitpack< OtherStorage > rhs) |
| Update for fields that are themselves Bitpacks at smaller types. | |
Static Public Attributes | |
| static constexpr FieldInfo | Info = InfoParam |
| Expose the FieldInfo parameter. | |
| static constexpr Storage | ValueMask |
| A span of set bits, starting at index 0, and of the field's width. | |
| static constexpr Storage | FieldMask = ValueMask << Info.minIndex |
| The mask of bits occupied by this value (occupied bits are set). | |
A particular Field within a Bitpack.
Fields are templated on the type as seen by external code and the FieldInfo data giving the field's location and other properties.
Definition at line 483 of file bitpack.hh.
| using Bitpack< StorageParam >::Field< TypeParam, InfoParam >::ConditionalConstRef |
Definition at line 785 of file bitpack.hh.
| using Bitpack< StorageParam >::Field< TypeParam, InfoParam >::Type = TypeParam |
Expose the type parameter.
Definition at line 486 of file bitpack.hh.
|
inlinestaticconstexpr |
Extract a Field from a raw Storage value.
Definition at line 522 of file bitpack.hh.
References Info, and ValueMask.
Referenced by Bitpack< StorageParam >::Field< TypeParam, InfoParam >::Proxy< DerivedBitpack, RefTypeParam >::alter(), Bitpack< StorageParam >::Field< TypeParam, InfoParam >::Proxy< DerivedBitpack, RefTypeParam >::assign_from(), Bitpack< StorageParam >::Field< TypeParam, InfoParam >::Proxy< DerivedBitpack, RefTypeParam >::operator Field::Type(), and Bitpack< StorageParam >::Field< TypeParam, InfoParam >::Proxy< DerivedBitpack, RefTypeParam >::with().
|
inlinestaticconstexpr |
Update for fields that are themselves Bitpacks at smaller types.
Definition at line 543 of file bitpack.hh.
References Bitpack< StorageParam >::Bitpack(), and raw_with().
|
inlinestaticconstexpr |
Compute the underlying Storage transform for a Field update.
Definition at line 528 of file bitpack.hh.
References FieldMask, Info, and ValueMask.
Referenced by Bitpack< StorageParam >::Field< TypeParam, InfoParam >::Proxy< DerivedBitpack, RefTypeParam >::alter(), Bitpack< StorageParam >::Field< TypeParam, InfoParam >::Proxy< DerivedBitpack, RefTypeParam >::assign_from(), Bitpack< StorageParam >::Field< TypeParam, InfoParam >::Proxy< DerivedBitpack, RefTypeParam >::operator=(), Bitpack< StorageParam >::Field< TypeParam, InfoParam >::Proxy< DerivedBitpack, RefTypeParam >::operator=(), raw_with(), Bitpack< StorageParam >::Field< TypeParam, InfoParam >::Proxy< DerivedBitpack, RefTypeParam >::with(), and Bitpack< StorageParam >::Field< TypeParam, InfoParam >::Proxy< DerivedBitpack, RefTypeParam >::with().
|
inlinestaticconstexpr |
Update for fields whose type can be static_cast to Storage.
Definition at line 534 of file bitpack.hh.
|
staticconstexpr |
The mask of bits occupied by this value (occupied bits are set).
Definition at line 519 of file bitpack.hh.
Referenced by raw_with().
|
staticconstexpr |
Expose the FieldInfo parameter.
Definition at line 488 of file bitpack.hh.
Referenced by raw_view(), and raw_with().
|
staticconstexpr |
A span of set bits, starting at index 0, and of the field's width.
Definition at line 515 of file bitpack.hh.
Referenced by raw_view(), and raw_with().