@@ -73,6 +73,8 @@ template <typename T> struct status<T, typename std::enable_if<std::is_same<T, u
7373 static inline unsigned FS (T v) { return bit_sub<13 , 2 >(v); };
7474 // machine previous privilege
7575 static inline unsigned MPP (T v) { return bit_sub<11 , 2 >(v); };
76+ // vector unit status Off/Initial/Clean/Dirty
77+ static inline unsigned VS (T v) { return bit_sub<9 , 2 >(v); };
7678 // supervisor previous privilege
7779 static inline unsigned SPP (T v) { return bit_sub<8 , 1 >(v); };
7880 // previous machine interrupt-enable
@@ -121,6 +123,8 @@ template <typename T> struct status<T, typename std::enable_if<std::is_same<T, u
121123 static inline unsigned FS (T v) { return bit_sub<13 , 2 >(v); };
122124 // machine previous privilege
123125 static inline unsigned MPP (T v) { return bit_sub<11 , 2 >(v); };
126+ // vector unit status Off/Initial/Clean/Dirty
127+ static inline unsigned VS (T v) { return bit_sub<9 , 2 >(v); };
124128 // supervisor previous privilege
125129 static inline unsigned SPP (T v) { return bit_sub<8 , 1 >(v); };
126130 // previous machine interrupt-enable
@@ -165,6 +169,8 @@ template <typename T> class hart_state<T, typename std::enable_if<std::is_same<T
165169 BF_FIELD (FS, 13 , 2 );
166170 // machine previous privilege
167171 BF_FIELD (MPP, 11 , 2 );
172+ // vector unit status Off/Initial/Clean/Dirty
173+ BF_FIELD (VS, 9 , 2 );
168174 // supervisor previous privilege
169175 BF_FIELD (SPP, 8 , 1 );
170176 // previous machine interrupt-enable
@@ -220,6 +226,8 @@ template <typename T> class hart_state<T, typename std::enable_if<std::is_same<T
220226 BF_FIELD (FS, 13 , 2 );
221227 // machine previous privilege
222228 BF_FIELD (MPP, 11 , 2 );
229+ // vector unit status Off/Initial/Clean/Dirty
230+ BF_FIELD (VS, 9 , 2 );
223231 // supervisor previous privilege
224232 BF_FIELD (SPP, 8 , 1 );
225233 // previous machine interrupt-enable
@@ -238,7 +246,7 @@ template <typename T> class hart_state<T, typename std::enable_if<std::is_same<T
238246
239247 mstatus_t mstatus;
240248
241- static const T mstatus_reset_val = 0x500001800 ;
249+ static const T mstatus_reset_val = 0x1800 ;
242250};
243251} // namespace arch
244252} // namespace iss
0 commit comments