From b7c0fb2b1c3b993a07a4bd7f09f698bb8ca83245 Mon Sep 17 00:00:00 2001 From: Stas Date: Wed, 10 Mar 2021 12:40:06 +0100 Subject: [PATCH] fix bitfield structure --- incl/iss/arch/riscv_hart_m_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/incl/iss/arch/riscv_hart_m_p.h b/incl/iss/arch/riscv_hart_m_p.h index d0ae20c..7d11c71 100644 --- a/incl/iss/arch/riscv_hart_m_p.h +++ b/incl/iss/arch/riscv_hart_m_p.h @@ -302,7 +302,7 @@ public: void write_mstatus(T val) { auto mask = get_mask(); - auto new_val = (mstatus.st.value & ~mask) | (val & mask); + auto new_val = (mstatus.backing.val & ~mask) | (val & mask); mstatus = new_val; }