From 3c8320ecd76b1d98b5d0955dd521bf5ee1616136 Mon Sep 17 00:00:00 2001 From: viktoryou <143797577+viktoryou@users.noreply.github.com> Date: Fri, 1 Sep 2023 19:36:35 +0800 Subject: fix condition of executing cbo.inval as a flush operation Signed-off-by: viktoryou <143797577+viktoryou@users.noreply.github.com> --- riscv/insns/cbo_inval.h | 6 +++--- 1 file 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); -- cgit v1.1