From: Prashanth Mundkur Date: Thu, 5 Apr 2018 00:25:01 +0000 (-0700) Subject: Allow querying the mmu configuration chosen during the build. (#191) X-Git-Url: https://git.libre-soc.org/?p=riscv-isa-sim.git;a=commitdiff_plain;h=2dbcb01ca1c026b867cf673203646d213f6e6b5c Allow querying the mmu configuration chosen during the build. (#191) --- diff --git a/riscv/mmu.h b/riscv/mmu.h index f0bc19d..a3f06c6 100644 --- a/riscv/mmu.h +++ b/riscv/mmu.h @@ -239,6 +239,24 @@ public: void register_memtracer(memtracer_t*); + int is_dirty_enabled() + { +#ifdef RISCV_ENABLE_DIRTY + return 1; +#else + return 0; +#endif + } + + int is_misaligned_enabled() + { +#ifdef RISCV_ENABLE_MISALIGNED + return 1; +#else + return 0; +#endif + } + private: simif_t* sim; processor_t* proc;