diff --git a/src/arch/generic/vec_pred_reg.hh b/src/arch/generic/vec_pred_reg.hh index 3e248b4bb1..54228a17cd 100644 --- a/src/arch/generic/vec_pred_reg.hh +++ b/src/arch/generic/vec_pred_reg.hh @@ -336,33 +336,26 @@ class VecPredRegContainer /// Create a view of this container. /// - /// If NumElems is provided, the size of the container is bounds-checked, - /// otherwise the size is inferred from the container size. /// @tparam VecElem Type of the vector elements. - /// @tparam NumElems Number of vector elements making up the view. /// @{ - template - VecPredRegT as() const + template + VecPredRegT + as() const { - static_assert((Packed && NumElems <= NumBits) || - (!Packed && - NumBits % sizeof(VecElem) == 0 && - sizeof(VecElem) * NumElems <= NumBits), - "Container size incompatible with view size"); - return VecPredRegT(*this); + static_assert(NumBits % sizeof(VecElem) == 0, + "Container size incompatible with view size."); + return VecPredRegT( + *this); } - template - VecPredRegT as() + template + VecPredRegT + as() { - static_assert((Packed && NumElems <= NumBits) || - (!Packed && - NumBits % sizeof(VecElem) == 0 && - sizeof(VecElem) * NumElems <= NumBits), - "Container size incompatible with view size"); - return VecPredRegT(*this); + static_assert(NumBits % sizeof(VecElem) == 0, + "Container size incompatible with view size."); + return VecPredRegT( + *this); } /// @} };