gem5  v20.1.0.0
Classes | Namespaces | Macros | Typedefs | Functions
bitunion.hh File Reference
#include <functional>
#include <iostream>
#include <type_traits>
#include <typeinfo>
#include "base/bitfield.hh"

Go to the source code of this file.

Classes

class  BitfieldTypeImpl< Base >
 
struct  BitfieldTypeImpl< Base >::TypeDeducer
 
struct  BitfieldTypeImpl< Base >::TypeDeducer::T< typename >
 
struct  BitfieldTypeImpl< Base >::TypeDeducer::T< void(C::*)(Type1 &, Type2)>
 
struct  BitfieldTypeImpl< Base >::TypeDeducer::Wrapper
 
class  BitfieldType< Base >
 
class  BitfieldROType< Base >
 
class  BitfieldWOType< Base >
 
class  BitfieldBackend::Unsigned< Storage, first, last >
 
class  BitfieldBackend::Signed< Storage, first, last >
 
class  BitfieldBackend::BitfieldTypes< Storage >
 
class  BitfieldBackend::BitUnionOperators< Base >
 
struct  BitfieldBackend::BitUnionBaseType< T >
 
struct  BitfieldBackend::BitUnionBaseType< BitUnionType< T > >
 
struct  std::hash< BitUnionType< T > >
 

Namespaces

 BitfieldBackend
 
 std
 Overload hash function for BasicBlockRange type.
 

Macros

#define __BitUnion(type, name)
 
#define EndBitUnion(name)
 This closes off the class and union started by the above macro. More...
 
#define __SubBitUnion(name, fieldType, ...)
 
#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...
 
#define BitUnion32(name)   __BitUnion(uint32_t, name)
 
#define BitUnion16(name)   __BitUnion(uint16_t, name)
 
#define BitUnion8(name)   __BitUnion(uint8_t, name)
 

Typedefs

template<typename T >
using BitUnionType = BitfieldBackend::BitUnionOperators< T >
 
template<typename T >
using BitUnionBaseType = typename BitfieldBackend::BitUnionBaseType< T >::Type
 

Functions

template<typename T >
static std::ostream & BitfieldBackend::bitfieldBackendPrinter (std::ostream &os, const T &t)
 
template<>
std::ostream & BitfieldBackend::bitfieldBackendPrinter (std::ostream &os, const char &t)
 
template<>
std::ostream & BitfieldBackend::bitfieldBackendPrinter (std::ostream &os, const unsigned char &t)
 
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...
 

Macro Definition Documentation

◆ __BitUnion

#define __BitUnion (   type,
  name 
)
Value:
class BitfieldUnderlyingClasses##name : \
{ \
protected: \
typedef type __StorageType; \
BitfieldBackend::BitUnionOperators< \
BitfieldUnderlyingClasses##name> >; \
BitfieldUnderlyingClasses##name>; \
public: \
union { \
type __storage;

Definition at line 310 of file bitunion.hh.

◆ __SubBitUnion

#define __SubBitUnion (   name,
  fieldType,
  ... 
)
Value:
class \
{ \
public: \
union { \
fieldType<__VA_ARGS__> __storage;

Definition at line 344 of file bitunion.hh.

◆ BitUnion16

#define BitUnion16 (   name)    __BitUnion(uint16_t, name)

Definition at line 401 of file bitunion.hh.

◆ BitUnion32

#define BitUnion32 (   name)    __BitUnion(uint32_t, name)

Definition at line 400 of file bitunion.hh.

◆ BitUnion8

#define BitUnion8 (   name)    __BitUnion(uint8_t, name)

Definition at line 402 of file bitunion.hh.

type
uint8_t type
Definition: inet.hh:421
BitfieldBackend::BitUnionBaseType
Definition: bitunion.hh:429
name
const std::string & name()
Definition: trace.cc:50
BitfieldBackend::BitfieldTypes
Definition: bitunion.hh:216

Generated on Wed Sep 30 2020 14:02:18 for gem5 by doxygen 1.8.17