aboutsummaryrefslogtreecommitdiff
path: root/riscv/mmu.cc
diff options
context:
space:
mode:
authorYenHaoChen <howard25336284@gmail.com>2023-07-13 09:27:46 +0800
committerYenHaoChen <howard25336284@gmail.com>2023-07-13 11:51:35 +0800
commitfaceda27e60c0721b3233658198bcf50d09b02cc (patch)
tree0c9eca2e4c82df5e3edd8d8e6f5f2b2c8228b8a3 /riscv/mmu.cc
parented5dccb2911f3b2dda731e5fe65e6c03ad0b46fb (diff)
downloadriscv-isa-sim-faceda27e60c0721b3233658198bcf50d09b02cc.zip
riscv-isa-sim-faceda27e60c0721b3233658198bcf50d09b02cc.tar.gz
riscv-isa-sim-faceda27e60c0721b3233658198bcf50d09b02cc.tar.bz2
refactor: mcontrol/mcontrol6: extend check_triggers() with tval parameter
Diffstat (limited to 'riscv/mmu.cc')
-rw-r--r--riscv/mmu.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/riscv/mmu.cc b/riscv/mmu.cc
index 3f90060..f6d23a3 100644
--- a/riscv/mmu.cc
+++ b/riscv/mmu.cc
@@ -169,7 +169,7 @@ bool mmu_t::mmio(reg_t paddr, size_t len, uint8_t* bytes, access_type type)
return true;
}
-void mmu_t::check_triggers(triggers::operation_t operation, reg_t address, bool virt, std::optional<reg_t> data)
+void mmu_t::check_triggers(triggers::operation_t operation, reg_t address, bool virt, reg_t tval, std::optional<reg_t> data)
{
if (matched_trigger || !proc)
return;
@@ -179,13 +179,13 @@ void mmu_t::check_triggers(triggers::operation_t operation, reg_t address, bool
if (match.has_value())
switch (match->timing) {
case triggers::TIMING_BEFORE:
- throw triggers::matched_t(operation, address, match->action, virt);
+ throw triggers::matched_t(operation, tval, match->action, virt);
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, match->action, virt);
+ matched_trigger = new triggers::matched_t(operation, tval, match->action, virt);
}
}