Skip to content

Commit 4790c8e

Browse files
p-wojadrabarek
authored andcommitted
[#59539] riscv: Replicate MTVEC CLIC mode in STVEC
1 parent c0f242a commit 4790c8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/op_helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ static inline target_ulong csr_read_helper(CPUState *env, target_ulong csrno)
711711
case CSR_STVAL:
712712
return env->stval;
713713
case CSR_STVEC:
714-
return env->stvec;
714+
return env->stvec | ((env->mtvec & MTVEC_MODE) == MTVEC_MODE_CLIC ? MTVEC_MODE_CLIC : 0);
715715
case CSR_SCOUNTEREN:
716716
return env->scounteren;
717717
case CSR_STVT:

0 commit comments

Comments
 (0)