mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 17:05:36 +00:00
target/riscv: Set VS bits in mideleg for Hyp extension
Backports commit 713d8363deb3774db14fb88a9fcd99687dcef114 from qemu
This commit is contained in:
parent
ebc7b9371f
commit
6aabd67ef8
|
@ -448,6 +448,9 @@ static int read_mideleg(CPURISCVState *env, int csrno, target_ulong *val)
|
|||
static int write_mideleg(CPURISCVState *env, int csrno, target_ulong val)
|
||||
{
|
||||
env->mideleg = (env->mideleg & ~delegable_ints) | (val & delegable_ints);
|
||||
if (riscv_has_ext(env, RVH)) {
|
||||
env->mideleg |= VS_MODE_INTERRUPTS;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue