diff --git a/src/arch/generic/vec_pred_reg.hh b/src/arch/generic/vec_pred_reg.hh index ad6bcceff1..9495911dbf 100644 --- a/src/arch/generic/vec_pred_reg.hh +++ b/src/arch/generic/vec_pred_reg.hh @@ -44,6 +44,7 @@ #include #include "base/cprintf.hh" +#include "base/types.hh" #include "sim/serialize_handlers.hh" namespace gem5 @@ -394,7 +395,27 @@ struct ShowParam> /// Dummy type aliases and constants for architectures that do not implement /// vector predicate registers. /// @{ -using DummyVecPredRegContainer = VecPredRegContainer<8, false>; +struct DummyVecPredRegContainer +{ + RegVal filler = 0; + bool operator == (const DummyVecPredRegContainer &d) const { return true; } + bool operator != (const DummyVecPredRegContainer &d) const { return true; } +}; +template <> +struct ParseParam +{ + static bool + parse(const std::string &s, DummyVecPredRegContainer &value) + { + return false; + } +}; +static_assert(sizeof(DummyVecPredRegContainer) == sizeof(RegVal)); +static inline std::ostream & +operator<<(std::ostream &os, const DummyVecPredRegContainer &d) +{ + return os; +} /// @} } // namespace gem5 diff --git a/src/arch/generic/vec_reg.hh b/src/arch/generic/vec_reg.hh index f32f5811b3..c818b1c8d9 100644 --- a/src/arch/generic/vec_reg.hh +++ b/src/arch/generic/vec_reg.hh @@ -104,6 +104,7 @@ #include "base/cprintf.hh" #include "base/logging.hh" +#include "base/types.hh" #include "sim/serialize_handlers.hh" namespace gem5 @@ -264,7 +265,27 @@ struct ShowParam> * vector registers. */ /** @{ */ -using DummyVecRegContainer = VecRegContainer<8>; +struct DummyVecRegContainer +{ + RegVal filler = 0; + bool operator == (const DummyVecRegContainer &d) const { return true; } + bool operator != (const DummyVecRegContainer &d) const { return true; } +}; +template <> +struct ParseParam +{ + static bool + parse(const std::string &s, DummyVecRegContainer &value) + { + return false; + } +}; +static_assert(sizeof(DummyVecRegContainer) == sizeof(RegVal)); +static inline std::ostream & +operator<<(std::ostream &os, const DummyVecRegContainer &d) +{ + return os; +} /** @} */ } // namespace gem5