File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -412,7 +412,8 @@ reg_t base_status_csr_t::compute_sstatus_write_mask() const noexcept {
412
412
// If a configuration has FS bits, they will always be accessible no
413
413
// matter the state of misa.
414
414
const bool has_fs = (proc->extension_enabled (' S' ) || proc->extension_enabled (' F' )) && !proc->extension_enabled (EXT_ZFINX);
415
- const bool has_vs = proc->extension_enabled (' V' );
415
+ // Implementations w/o V may still have mstatus.vs,
416
+ const bool has_vs = proc->any_vector_extensions ();
416
417
return 0
417
418
| (proc->extension_enabled (' S' ) ? (SSTATUS_SIE | SSTATUS_SPIE | SSTATUS_SPP) : 0 )
418
419
| (has_page ? (SSTATUS_SUM | SSTATUS_MXR) : 0 )
Original file line number Diff line number Diff line change @@ -273,6 +273,9 @@ class processor_t : public abstract_device_t
273
273
bool any_custom_extensions () const {
274
274
return !custom_extensions.empty ();
275
275
}
276
+ bool any_vector_extensions () const {
277
+ return VU.VLEN > 0 ;
278
+ }
276
279
bool extension_enabled (unsigned char ext) const {
277
280
return extension_enabled (isa_extension_t (ext));
278
281
}
You can’t perform that action at this time.
0 commit comments