aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--riscv/processor.cc4
-rw-r--r--riscv/processor.h2
-rw-r--r--riscv/triggers.cc4
3 files changed, 5 insertions, 5 deletions
diff --git a/riscv/processor.cc b/riscv/processor.cc
index ef2d05b..1287576 100644
--- a/riscv/processor.cc
+++ b/riscv/processor.cc
@@ -988,14 +988,14 @@ bool processor_t::store(reg_t addr, size_t len, const uint8_t* bytes)
return false;
}
-void processor_t::trigger_updated(const std::vector<triggers::trigger_t *> *triggers)
+void processor_t::trigger_updated(const std::vector<triggers::trigger_t *> &triggers)
{
mmu->flush_tlb();
mmu->check_triggers_fetch = false;
mmu->check_triggers_load = false;
mmu->check_triggers_store = false;
- for (auto trigger : *triggers) {
+ for (auto trigger : triggers) {
if (trigger->execute()) {
mmu->check_triggers_fetch = true;
}
diff --git a/riscv/processor.h b/riscv/processor.h
index bd805cc..2212fd3 100644
--- a/riscv/processor.h
+++ b/riscv/processor.h
@@ -314,7 +314,7 @@ public:
HR_GROUP /* Halt requested due to halt group. */
} halt_request;
- void trigger_updated(const std::vector<triggers::trigger_t *> *triggers);
+ void trigger_updated(const std::vector<triggers::trigger_t *> &triggers);
void set_pmp_num(reg_t pmp_num);
void set_pmp_granularity(reg_t pmp_granularity);
diff --git a/riscv/triggers.cc b/riscv/triggers.cc
index eda6630..69888bf 100644
--- a/riscv/triggers.cc
+++ b/riscv/triggers.cc
@@ -186,7 +186,7 @@ reg_t module_t::tdata1_read(const processor_t * const proc, unsigned index) cons
bool module_t::tdata1_write(processor_t * const proc, unsigned index, const reg_t val) noexcept
{
bool result = triggers[index]->tdata1_write(proc, val);
- proc->trigger_updated(&triggers);
+ proc->trigger_updated(triggers);
return result;
}
@@ -198,7 +198,7 @@ reg_t module_t::tdata2_read(const processor_t * const proc, unsigned index) cons
bool module_t::tdata2_write(processor_t * const proc, unsigned index, const reg_t val) noexcept
{
bool result = triggers[index]->tdata2_write(proc, val);
- proc->trigger_updated(&triggers);
+ proc->trigger_updated(triggers);
return result;
}