Skip to content

Commit 7a16d71

Browse files
authored
Merge pull request #1992 from arrv-sc/arrv-sc/init-xlen
feat: initialize xlen in constructor
2 parents 587cf70 + 1e56ecb commit 7a16d71

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

riscv/processor.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ processor_t::processor_t(const char* isa_str, const char* priv_str,
3434
const cfg_t *cfg,
3535
simif_t* sim, uint32_t id, bool halt_on_reset,
3636
FILE* log_file, std::ostream& sout_)
37-
: debug(false), halt_request(HR_NONE), isa(isa_str, priv_str), cfg(cfg), sim(sim), id(id), xlen(0),
37+
: debug(false), halt_request(HR_NONE), isa(isa_str, priv_str), cfg(cfg),
38+
sim(sim), id(id), xlen(isa.get_max_xlen()),
3839
histogram_enabled(false), log_commits_enabled(false),
3940
log_file(log_file), sout_(sout_.rdbuf()), halt_on_reset(halt_on_reset),
4041
in_wfi(false), check_triggers_icount(false),

0 commit comments

Comments
 (0)