Fix a bug caused by moving misa into state_t. (#180)
authorPrashanth Mundkur <prashanth.mundkur@gmail.com>
Wed, 14 Mar 2018 16:48:11 +0000 (09:48 -0700)
committerAndrew Waterman <aswaterman@gmail.com>
Wed, 14 Mar 2018 16:48:11 +0000 (11:48 -0500)
commit7e35a2a62f7433060e2ab1c98b3afd8b8a69b829
tree49f948c9a3dd72d96d7207772ba758f62efec2de
parentbdd229b9ea9a78f2fe5d4af1d0a49cf50484aa86
Fix a bug caused by moving misa into state_t. (#180)

* Fix misa losing its value in processor constructor due to state:reset() following state.misa initialization.
Make state:reset() preserve misa.

* Set state.misa to max_isa on reset().

* Idiomatic fix for earlier commit.
riscv/processor.cc
riscv/processor.h