gem5
v21.2.0.0
|
#include <inst_res.hh>
Public Member Functions | |
InstResult () | |
Default constructor creates an invalid result. More... | |
InstResult (const InstResult &)=default | |
template<typename T > | |
InstResult (T val) | |
template<typename T , std::enable_if_t< std::is_floating_point_v< T >, int > = 0> | |
InstResult (T val) | |
template<typename T , std::enable_if_t< std::is_integral_v< T > &&!std::is_same_v< T, RegVal >, int > = 0> | |
InstResult (T val) | |
InstResult & | operator= (const InstResult &that) |
bool | operator== (const InstResult &that) const |
Result comparison Two invalid results always differ. More... | |
bool | operator!= (const InstResult &that) const |
template<typename T > | |
bool | is () const |
Checks. More... | |
template<typename T > | |
std::enable_if_t< std::is_integral_v< T > &&!std::is_same_v< T, RegVal >, bool > | is () const |
bool | isValid () const |
Is this a valid result?. More... | |
template<typename T > | |
T | as () const |
Explicit cast-like operations. More... | |
template<typename T > | |
std::enable_if_t< std::is_integral_v< T > &&!std::is_same_v< T, RegVal >, RegVal > | as () const |
template<typename T > | |
T | asNoAssert () const |
Cast to integer without checking type. More... | |
Private Attributes | |
std::any | result |
std::function< bool(const std::any &a, const std::any &b)> | equals |
Definition at line 50 of file inst_res.hh.
|
inline |
Default constructor creates an invalid result.
Definition at line 58 of file inst_res.hh.
References gem5::ArmISA::a, gem5::ArmISA::b, and gem5_assert.
|
default |
|
inlineexplicit |
Definition at line 69 of file inst_res.hh.
References gem5::ArmISA::a, gem5::ArmISA::b, and gem5_assert.
|
inlineexplicit |
Definition at line 99 of file inst_res.hh.
|
inlineexplicit |
Definition at line 105 of file inst_res.hh.
|
inline |
Explicit cast-like operations.
Definition at line 158 of file inst_res.hh.
References result.
Referenced by gem5::Checker< gem5::RefCountingPtr >::copyResult(), and gem5::Checker< gem5::RefCountingPtr >::validateExecution().
|
inline |
Definition at line 167 of file inst_res.hh.
|
inline |
Cast to integer without checking type.
This is required to have the o3 cpu checker happy, as it compares results as integers without being fully aware of their nature.
Definition at line 178 of file inst_res.hh.
Referenced by gem5::Checker< gem5::RefCountingPtr >::validateExecution().
|
inline |
Checks.
Definition at line 136 of file inst_res.hh.
References result.
Referenced by gem5::Checker< gem5::RefCountingPtr >::validateExecution().
|
inline |
Definition at line 145 of file inst_res.hh.
|
inline |
|
inline |
Definition at line 126 of file inst_res.hh.
References operator==().
|
inline |
Definition at line 108 of file inst_res.hh.
|
inline |
Result comparison Two invalid results always differ.
Definition at line 120 of file inst_res.hh.
References equals, and result.
Referenced by operator!=().
Definition at line 54 of file inst_res.hh.
Referenced by operator=(), and operator==().
|
private |
Definition at line 53 of file inst_res.hh.
Referenced by as(), is(), isValid(), operator=(), and operator==().