gem5  v20.0.0.3
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)
 
#define __SubBitUnion(name, fieldType, ...)
 
#define EndSubBitUnion(name)
 
#define SubBitUnion(name, first, last)   __SubBitUnion(name, Bitfield, first, last)
 
#define SignedSubBitUnion(name, first, last)   __SubBitUnion(name, SignedBitfield, first, last)
 
#define BitUnion(type, name)   __BitUnion(type, name)
 
#define BitUnion64(name)   __BitUnion(uint64_t, name)
 
#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)
 

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;
const std::string & name()
Definition: trace.cc:50
uint8_t type
Definition: inet.hh:328

Definition at line 309 of file bitunion.hh.

◆ __SubBitUnion

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

Definition at line 339 of file bitunion.hh.

◆ BitUnion

#define BitUnion (   type,
  name 
)    __BitUnion(type, name)

Definition at line 371 of file bitunion.hh.

Referenced by TEST_F().

◆ BitUnion16

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

Definition at line 376 of file bitunion.hh.

◆ BitUnion32

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

Definition at line 375 of file bitunion.hh.

◆ BitUnion64

#define BitUnion64 (   name)    __BitUnion(uint64_t, name)

Definition at line 374 of file bitunion.hh.

◆ BitUnion8

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

Definition at line 377 of file bitunion.hh.

◆ EndBitUnion

#define EndBitUnion (   name)
Value:
}; \
}; \
BitfieldUnderlyingClasses##name> name;
const std::string & name()
Definition: trace.cc:50

Definition at line 328 of file bitunion.hh.

◆ EndSubBitUnion

#define EndSubBitUnion (   name)
Value:
}; \
inline operator __StorageType () const \
{ return __storage; } \
\
inline __StorageType operator = (const __StorageType & _storage) \
{ return __storage = _storage;} \
} name;
const std::string & name()
Definition: trace.cc:50

Definition at line 351 of file bitunion.hh.

◆ SignedSubBitUnion

#define SignedSubBitUnion (   name,
  first,
  last 
)    __SubBitUnion(name, SignedBitfield, first, last)

Definition at line 367 of file bitunion.hh.

◆ SubBitUnion

#define SubBitUnion (   name,
  first,
  last 
)    __SubBitUnion(name, Bitfield, first, last)

Definition at line 362 of file bitunion.hh.

Typedef Documentation

◆ BitUnionBaseType

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

Definition at line 414 of file bitunion.hh.

◆ BitUnionType

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

Definition at line 396 of file bitunion.hh.

Function Documentation

◆ operator<<()

template<typename T >
std::ostream& operator<< ( std::ostream &  os,
const BitUnionType< T > &  bu 
)

Definition at line 467 of file bitunion.hh.

References BitfieldBackend::bitfieldBackendPrinter(), and X86ISA::os.


Generated on Fri Jul 3 2020 15:53:08 for gem5 by doxygen 1.8.13