diff options
author | YenHaoChen <howard25336284@gmail.com> | 2022-12-30 11:52:01 +0800 |
---|---|---|
committer | YenHaoChen <howard25336284@gmail.com> | 2023-01-04 09:41:08 +0800 |
commit | 0a45912d601fd27bf46c7a51e55dab5e319b15eb (patch) | |
tree | f0f684f9af0c3fb7b352eb8c56980009641f88f9 | |
parent | 6fd0169b32a17cc5a962477fb044715929ae6bd1 (diff) | |
download | riscv-isa-sim-0a45912d601fd27bf46c7a51e55dab5e319b15eb.zip riscv-isa-sim-0a45912d601fd27bf46c7a51e55dab5e319b15eb.tar.gz riscv-isa-sim-0a45912d601fd27bf46c7a51e55dab5e319b15eb.tar.bz2 |
triggers: refactor: move textra_match() into mcontrol_common_t::detect_memory_access_match()
-rw-r--r-- | riscv/triggers.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/riscv/triggers.cc b/riscv/triggers.cc index 3f32f18..455fb07 100644 --- a/riscv/triggers.cc +++ b/riscv/triggers.cc @@ -190,7 +190,8 @@ std::optional<match_result_t> mcontrol_common_t::detect_memory_access_match(proc if ((operation == triggers::OPERATION_EXECUTE && !execute) || (operation == triggers::OPERATION_STORE && !store) || (operation == triggers::OPERATION_LOAD && !load) || - !mode_match(proc->get_state())) { + !mode_match(proc->get_state()) || + !textra_match(proc)) { return std::nullopt; } @@ -477,7 +478,7 @@ std::optional<match_result_t> module_t::detect_memory_access_match(operation_t o * entire chain did not match. This is allowed by the spec, because the final * trigger in the chain will never get `hit` set unless the entire chain * matches. */ - auto result = trigger->textra_match(proc) ? trigger->detect_memory_access_match(proc, operation, address, data) : std::nullopt; + auto result = trigger->detect_memory_access_match(proc, operation, address, data); if (result.has_value() && !trigger->get_chain()) return result; |