diff options
author | Andrew Waterman <andrew@sifive.com> | 2024-05-31 15:37:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-31 15:37:15 -0700 |
commit | 00dfa28cd71326a9b553052bf0160cb76f0e7e07 (patch) | |
tree | 8f84650d9d8c783ee582c8d2956cce995fd8dca1 /riscv/execute.cc | |
parent | 3a70f84b8a2249c92d35c2229b48ca5735a543fa (diff) | |
parent | 759599553bab6c95399253ba366a0f5b1b3dd48f (diff) | |
download | spike-00dfa28cd71326a9b553052bf0160cb76f0e7e07.zip spike-00dfa28cd71326a9b553052bf0160cb76f0e7e07.tar.gz spike-00dfa28cd71326a9b553052bf0160cb76f0e7e07.tar.bz2 |
Merge pull request #1684 from riscv-software-src/simplify-zicfilp
Avoid checking ELP before every instruction fetch
Diffstat (limited to 'riscv/execute.cc')
-rw-r--r-- | riscv/execute.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/riscv/execute.cc b/riscv/execute.cc index b2532c9..f263dce 100644 --- a/riscv/execute.cc +++ b/riscv/execute.cc @@ -247,6 +247,8 @@ void processor_t::step(size_t n) { take_pending_interrupt(); + check_if_lpad_required(); + if (unlikely(slow_path())) { // Main simulation loop, slow path. @@ -280,7 +282,6 @@ void processor_t::step(size_t n) in_wfi = false; insn_fetch_t fetch = mmu->load_insn(pc); - execute_insn_prehook(fetch.insn); if (debug && !state.serialized) disasm(fetch.insn); pc = execute_insn_logged(this, pc, fetch); @@ -292,7 +293,6 @@ void processor_t::step(size_t n) // Main simulation loop, fast path. for (auto ic_entry = _mmu->access_icache(pc); ; ) { auto fetch = ic_entry->data; - execute_insn_prehook(fetch.insn); pc = execute_insn_fast(this, pc, fetch); ic_entry = ic_entry->next; if (unlikely(ic_entry->tag != pc)) |