mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-23 05:25:11 +00:00
target/riscv: Improve the scause logic
No functional change, just making the code easier to read. Backports commit 16fdb8ff64374ed51b246437e13043039a8eb9f9 from qemu
This commit is contained in:
parent
4b0355dcfc
commit
b44de569f0
|
@ -500,7 +500,7 @@ void riscv_cpu_do_interrupt(CPUState *cs)
|
|||
s = set_field(s, MSTATUS_SPP, env->priv);
|
||||
s = set_field(s, MSTATUS_SIE, 0);
|
||||
env->mstatus = s;
|
||||
env->scause = cause | ~(((target_ulong)-1) >> async);
|
||||
env->scause = cause | ((target_ulong)async << (TARGET_LONG_BITS - 1));
|
||||
env->sepc = env->pc;
|
||||
env->sbadaddr = tval;
|
||||
env->pc = (env->stvec >> 2 << 2) +
|
||||
|
|
Loading…
Reference in a new issue