aboutsummaryrefslogtreecommitdiff
path: root/riscv/mmu.cc
diff options
context:
space:
mode:
authorYenHaoChen <howard25336284@gmail.com>2022-11-30 11:27:48 +0800
committerYenHaoChen <howard25336284@gmail.com>2022-11-30 12:11:42 +0800
commita399d65d9fab4c38839a71dbd38d3c04c3494514 (patch)
tree5508dd73a0bfbb477d1fafc0118d3bb85e3366fc /riscv/mmu.cc
parentb81652954ef91c6ab169efaae050825d159fdf05 (diff)
downloadriscv-isa-sim-a399d65d9fab4c38839a71dbd38d3c04c3494514.zip
riscv-isa-sim-a399d65d9fab4c38839a71dbd38d3c04c3494514.tar.gz
riscv-isa-sim-a399d65d9fab4c38839a71dbd38d3c04c3494514.tar.bz2
triggers: refactor: let action be part of match_result_t
Diffstat (limited to 'riscv/mmu.cc')
-rw-r--r--riscv/mmu.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/riscv/mmu.cc b/riscv/mmu.cc
index f2d8445..86022e3 100644
--- a/riscv/mmu.cc
+++ b/riscv/mmu.cc
@@ -157,19 +157,18 @@ void mmu_t::check_triggers(triggers::operation_t operation, reg_t address, std::
if (matched_trigger || !proc)
return;
- triggers::action_t action;
- auto match = proc->TM.memory_access_match(&action, operation, address, data);
+ triggers::match_result_t match = proc->TM.memory_access_match(operation, address, data);
if (match.fire)
switch (match.timing) {
case triggers::TIMING_BEFORE:
- throw triggers::matched_t(operation, address, action);
+ throw triggers::matched_t(operation, address, match.action);
case triggers::TIMING_AFTER:
// We want to take this exception on the next instruction. We check
// whether to do so in the I$ refill path, so flush the I$.
flush_icache();
- matched_trigger = new triggers::matched_t(operation, address, action);
+ matched_trigger = new triggers::matched_t(operation, address, match.action);
}
}