提交 2a73091a 编写于 作者: W William Wang

Merge branch 'csr-check' into xs

......@@ -9,6 +9,11 @@ static inline bool csr_check(DecodeExecState *s, uint32_t addr) {
raise_intr(s, EX_II, cpu.pc);
return false;
}
int lowest_access_priv_level = (addr & 0b11 << 8) >> 8; // addr(9,8)
if (!(cpu.mode >= lowest_access_priv_level)) {
raise_intr(s, EX_II, cpu.pc);
return false;
}
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册