Go to the documentation of this file.
38 #ifndef __CPU_INST_RES_HH__
39 #define __CPU_INST_RES_HH__
41 #include <type_traits>
78 static_assert(std::is_integral<T>::value ^
79 std::is_floating_point<T>::value,
80 "Parameter type is neither integral nor fp, or it is both");
81 if (std::is_integral<T>::value) {
83 }
else if (std::is_floating_point<T>::value) {
116 panic(
"Assigning result from unknown result type");
126 if (this->type != that.
type)
140 panic(
"Unknown type of result: %d\n", (
int)
type);
196 panic_if(!
isPred(),
"Converting scalar (or invalid) to predicate!!");
203 #endif // __CPU_INST_RES_HH__
const TheISA::VecRegContainer & asVector() const
bool isScalar() const
Checks.
VecReg::Container VecRegContainer
TheISA::VecPredRegContainer pred
VecPredReg::Container VecPredRegContainer
InstResult(T i, const ResultType &t)
Scalar result from scalar.
bool isVecElem() const
Is this a vector element result?.
bool isValid() const
Is this a valid result?.
bool isPred() const
Is this a predicate result?.
const uint64_t & asIntegerNoAssert() const
Cast to integer without checking type.
const uint64_t & asInteger() const
Explicit cast-like operations.
bool operator!=(const InstResult &that) const
InstResult(const TheISA::VecPredRegContainer &v, const ResultType &t)
Predicate result.
TheISA::VecRegContainer vector
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
InstResult & operator=(const InstResult &that)
const TheISA::VecPredRegContainer & asPred() const
bool operator==(const InstResult &that) const
Result comparison Two invalid results always differ.
InstResult()
Default constructor creates an invalid result.
const TheISA::VecElem & asVectorElem() const
bool isVector() const
Is this a vector result?.
InstResult(const TheISA::VecRegContainer &v, const ResultType &t)
Vector result.
#define panic(...)
This implements a cprintf based panic() function.
Generated on Tue Jun 22 2021 15:28:26 for gem5 by doxygen 1.8.17