diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-02-13 14:13:51 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-02-13 14:13:51 -0800 |
commit | ea3ad100c5603d0a32dba2e5561f4df2dd9493dd (patch) | |
tree | cca454118a869382aa3301dcf31dbf0e52a5598f /riscv/mmu.cc | |
parent | b119073ab013f387000435ba5a55a3026fc8a8d9 (diff) | |
download | spike-ea3ad100c5603d0a32dba2e5561f4df2dd9493dd.zip spike-ea3ad100c5603d0a32dba2e5561f4df2dd9493dd.tar.gz spike-ea3ad100c5603d0a32dba2e5561f4df2dd9493dd.tar.bz2 |
clean up fetch-execute loop a bit
Diffstat (limited to 'riscv/mmu.cc')
-rw-r--r-- | riscv/mmu.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/riscv/mmu.cc b/riscv/mmu.cc index 6782ae2..0cc1035 100644 --- a/riscv/mmu.cc +++ b/riscv/mmu.cc @@ -13,6 +13,11 @@ mmu_t::~mmu_t() { } +void mmu_t::flush_icache() +{ + memset(icache_tag, -1, sizeof(icache_tag)); +} + void mmu_t::flush_tlb() { memset(tlb_insn_tag, -1, sizeof(tlb_insn_tag)); @@ -22,12 +27,7 @@ void mmu_t::flush_tlb() flush_icache(); } -void mmu_t::flush_icache() -{ - memset(icache_tag, -1, sizeof(icache_tag)); -} - -void* mmu_t::refill(reg_t addr, reg_t bytes, bool store, bool fetch) +void* mmu_t::refill_tlb(reg_t addr, reg_t bytes, bool store, bool fetch) { reg_t idx = (addr >> PGSHIFT) % TLB_ENTRIES; reg_t expected_tag = addr & ~(PGSIZE-1); |