diff options
author | Scott Johnson <scott.johnson@arilinc.com> | 2022-12-08 13:09:12 -0800 |
---|---|---|
committer | YenHaoChen <howard25336284@gmail.com> | 2022-12-10 19:45:27 +0800 |
commit | b2e6e7637e3ae90e7e0e709b6e39bbc817375f18 (patch) | |
tree | 907f5ed325c17f409ca74584f0442c6925951e84 /riscv/triggers.h | |
parent | ef5609525f1db12503c852f8fff03f43a89aade6 (diff) | |
download | riscv-isa-sim-b2e6e7637e3ae90e7e0e709b6e39bbc817375f18.zip riscv-isa-sim-b2e6e7637e3ae90e7e0e709b6e39bbc817375f18.tar.gz riscv-isa-sim-b2e6e7637e3ae90e7e0e709b6e39bbc817375f18.tar.bz2 |
Move mhselect_compare into mhselect_interpretation
Diffstat (limited to 'riscv/triggers.h')
-rw-r--r-- | riscv/triggers.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/riscv/triggers.h b/riscv/triggers.h index d78806e..d274af4 100644 --- a/riscv/triggers.h +++ b/riscv/triggers.h @@ -96,6 +96,9 @@ private: const unsigned mhselect; const mhselect_mode_t mode; const std::optional<bool> shift_mhvalue; + unsigned compare_val(const unsigned mhvalue) const { + return shift_mhvalue.value() ? (mhvalue << 1 | mhselect >> 2) : mhvalue; + }; }; mhselect_interpretation interpret_mhselect(bool h_enabled) const noexcept { @@ -117,9 +120,6 @@ private: return table[legal].value(); } - unsigned mhselect_compare(bool h_enabled) const noexcept { - return legalize_mhselect(h_enabled) == 4 ? mhvalue : (mhvalue << 1) + (mhselect >> 2); // mhvalue or {mhvalue, mhselect[2]} - } sselect_t sselect; unsigned svalue; unsigned sbytemask; |