aboutsummaryrefslogtreecommitdiff
path: root/spike_main
diff options
context:
space:
mode:
authorDave Wen <dave.wen@sifive.com>2020-05-29 03:49:25 +0800
committerGitHub <noreply@github.com>2020-05-28 12:49:25 -0700
commit1edd5a019177ed1f8527465d8c239415a9f9e296 (patch)
tree65261369f8c487125611458501993f7b388014ef /spike_main
parent88c87dbbcf508b78ee2272528f5d404f3e5a0796 (diff)
downloadriscv-isa-sim-1edd5a019177ed1f8527465d8c239415a9f9e296.zip
riscv-isa-sim-1edd5a019177ed1f8527465d8c239415a9f9e296.tar.gz
riscv-isa-sim-1edd5a019177ed1f8527465d8c239415a9f9e296.tar.bz2
fix the memory regions checker (#474)
Diffstat (limited to 'spike_main')
-rw-r--r--spike_main/spike.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/spike_main/spike.cc b/spike_main/spike.cc
index 6ca8efc..d4e572c 100644
--- a/spike_main/spike.cc
+++ b/spike_main/spike.cc
@@ -118,7 +118,7 @@ void merge_overlapping_memory_regions(std::vector<std::pair<reg_t, mem_t*>>& mem
mems.erase(std::next(it).base());
}else if ( _start_page < start_page && _end_page > start_page) {
// overlapping
- _it->first = it->first;
+ _it->first = _start_page;
if (_end_page > end_page)
end_page = _end_page;
mems.erase(std::next(it).base());