diff options
author | Iman Hosseini <hosseini.iman@yahoo.com> | 2022-09-20 00:05:00 -0400 |
---|---|---|
committer | Iman Hosseini <hosseini.iman@yahoo.com> | 2022-09-20 00:05:00 -0400 |
commit | dfd191367991cb157b53767dcc05824c826b5abd (patch) | |
tree | 8891eff92502ba3d42a9ddf372f0f2f6e5a5e44c /riscv/sim.cc | |
parent | a0972c82d022f6f7c337b06b27c89a60af52202a (diff) | |
download | spike-dfd191367991cb157b53767dcc05824c826b5abd.zip spike-dfd191367991cb157b53767dcc05824c826b5abd.tar.gz spike-dfd191367991cb157b53767dcc05824c826b5abd.tar.bz2 |
detects the loading of isa-incompatible (i.e. 32 bit code to 64bit HART) code and emits an error message to help avoid unintentionally loading wrong elf.
Diffstat (limited to 'riscv/sim.cc')
-rw-r--r-- | riscv/sim.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/riscv/sim.cc b/riscv/sim.cc index 0000537..0ef13b8 100644 --- a/riscv/sim.cc +++ b/riscv/sim.cc @@ -202,6 +202,7 @@ int sim_t::run() { host = context_t::current(); target.init(sim_thread_main, this); + htif_t::set_expected_xlen(isa.get_max_xlen()); return htif_t::run(); } |