diff options
author | viktoryou <143797577+viktoryou@users.noreply.github.com> | 2023-09-01 19:36:35 +0800 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2023-09-01 13:29:22 -0700 |
commit | 3c8320ecd76b1d98b5d0955dd521bf5ee1616136 (patch) | |
tree | d99ebee1dd8a716712be36643707e0d554ff0b1c /riscv/insns | |
parent | 5854ab52181f96723178f903e623d21e61f4fe61 (diff) | |
download | riscv-isa-sim-3c8320ecd76b1d98b5d0955dd521bf5ee1616136.zip riscv-isa-sim-3c8320ecd76b1d98b5d0955dd521bf5ee1616136.tar.gz riscv-isa-sim-3c8320ecd76b1d98b5d0955dd521bf5ee1616136.tar.bz2 |
fix condition of executing cbo.inval as a flush operation
Signed-off-by: viktoryou <143797577+viktoryou@users.noreply.github.com>
Diffstat (limited to 'riscv/insns')
-rw-r--r-- | riscv/insns/cbo_inval.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/riscv/insns/cbo_inval.h b/riscv/insns/cbo_inval.h index bd80a6f..db13da9 100644 --- a/riscv/insns/cbo_inval.h +++ b/riscv/insns/cbo_inval.h @@ -1,9 +1,9 @@ require_extension(EXT_ZICBOM); DECLARE_XENVCFG_VARS(CBIE); require_envcfg(CBIE); -if (((STATE.prv != PRV_M) && (mCBIE == 1)) || - ((!STATE.v && (STATE.prv == PRV_U)) && (sCBIE = 1)) || - (STATE.v && ((hCBIE == 1) || ((STATE.prv == PRV_U) && (sCBIE== 0))))) +if ((STATE.prv != PRV_M && mCBIE) || + (!STATE.v && STATE.prv == PRV_U && sCBIE) || + (STATE.v && (hCBIE || (STATE.prv == PRV_U && sCBIE)))) MMU.clean_inval(RS1, true, true); else MMU.clean_inval(RS1, false, true); |