Skip to content

Commit db2425d

Browse files
committed
fixes wrong shift in clic write xcause
1 parent 7f7d08a commit db2425d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/iss/mem/clic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ template <typename WORD_TYPE> struct clic : public memory_elem {
227227
if(addr == arch::mcause) { // mcause access
228228
hart_if.state.mstatus.MPIE = (val >> 27) & 1;
229229
clic_mprev_lvl = ((val >> 16) & 0xff) | 0xff >> cfg.clic_int_ctl_bits;
230-
hart_if.state.mstatus.MPP = (val << 28) & 0x3;
230+
hart_if.state.mstatus.MPP = (val >> 28) & 0x3;
231231
} else if(addr == arch::ucause) {
232232
hart_if.state.mstatus.UPIE = (val >> 27) & 1;
233233
clic_uprev_lvl = ((val >> 16) & 0xff) | 0xff >> cfg.clic_int_ctl_bits;

0 commit comments

Comments
 (0)