gem5
v20.1.0.0
|
These are a collection of methods and macros of the BitUnion system of defining bitfields on top of an underlying class. More...
Macros | |
#define | EndBitUnion(name) |
This closes off the class and union started by the above macro. More... | |
#define | EndSubBitUnion(name) |
This closes off the union created above and gives it a name. More... | |
#define | SubBitUnion(name, first, last) __SubBitUnion(name, Bitfield, first, last) |
Regular bitfields These define macros for read/write regular bitfield based subbitfields. More... | |
#define | SignedSubBitUnion(name, first, last) __SubBitUnion(name, SignedBitfield, first, last) |
Regular bitfields These define macros for read/write regular bitfield based subbitfields. More... | |
#define | BitUnion(type, name) __BitUnion(type, name) |
Use this to define an arbitrary type overlayed with bitfields. More... | |
#define | BitUnion64(name) __BitUnion(uint64_t, name) |
Use this to define conveniently sized values overlayed with bitfields. More... | |
Typedefs | |
template<typename T > | |
using | BitUnionType = BitfieldBackend::BitUnionOperators< T > |
template<typename T > | |
using | BitUnionBaseType = typename BitfieldBackend::BitUnionBaseType< T >::Type |
Functions | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &os, const BitUnionType< T > &bu) |
A default << operator which casts a bitunion to its underlying type and passes it to BitfieldBackend::bitfieldBackendPrinter. More... | |
These are a collection of methods and macros of the BitUnion system of defining bitfields on top of an underlying class.
#define BitUnion | ( | type, | |
name | |||
) | __BitUnion(type, name) |
Use this to define an arbitrary type overlayed with bitfields.
Definition at line 392 of file bitunion.hh.
#define BitUnion64 | ( | name | ) | __BitUnion(uint64_t, name) |
Use this to define conveniently sized values overlayed with bitfields.
Definition at line 399 of file bitunion.hh.
#define EndBitUnion | ( | name | ) |
This closes off the class and union started by the above macro.
It is followed by a typedef which makes "name" refer to a BitfieldOperator class inheriting from the class and union just defined, which completes building up the type for the user.
Definition at line 333 of file bitunion.hh.
#define EndSubBitUnion | ( | name | ) |
This closes off the union created above and gives it a name.
Unlike the top level BitUnion, we're interested in creating an object instead of a type. The operators are defined in the macro itself instead of a class for technical reasons. If someone determines a way to move them to one, please do so.
Definition at line 360 of file bitunion.hh.
#define SignedSubBitUnion | ( | name, | |
first, | |||
last | |||
) | __SubBitUnion(name, SignedBitfield, first, last) |
Regular bitfields These define macros for read/write regular bitfield based subbitfields.
Definition at line 384 of file bitunion.hh.
#define SubBitUnion | ( | name, | |
first, | |||
last | |||
) | __SubBitUnion(name, Bitfield, first, last) |
Regular bitfields These define macros for read/write regular bitfield based subbitfields.
Definition at line 375 of file bitunion.hh.
using BitUnionBaseType = typename BitfieldBackend::BitUnionBaseType<T>::Type |
Definition at line 445 of file bitunion.hh.
using BitUnionType = BitfieldBackend::BitUnionOperators<T> |
Definition at line 424 of file bitunion.hh.
std::ostream& operator<< | ( | std::ostream & | os, |
const BitUnionType< T > & | bu | ||
) |
A default << operator which casts a bitunion to its underlying type and passes it to BitfieldBackend::bitfieldBackendPrinter.
Definition at line 502 of file bitunion.hh.
References BitfieldBackend::bitfieldBackendPrinter(), and X86ISA::os.