target/loongarch: Fix exception BCE missing to update CSR_BADV
Exception BCE need update CSR_BADV, and the value is env->pc. Signed-off-by: Song Gao <gaosong@loongson.cn> Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Bibo Mao <maobibo@loongson.cn> (cherry picked from commit e4f0ef58d53eb20056f9f3ca9f21dbbbf25f2530) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
b8456254d0
commit
7d662d328d
1 changed files with 3 additions and 1 deletions
|
|
@ -113,6 +113,9 @@ static void loongarch_cpu_do_interrupt(CPUState *cs)
|
|||
cause = cs->exception_index;
|
||||
update_badinstr = 0;
|
||||
break;
|
||||
case EXCCODE_BCE:
|
||||
env->CSR_BADV = env->pc;
|
||||
QEMU_FALLTHROUGH;
|
||||
case EXCCODE_SYS:
|
||||
case EXCCODE_BRK:
|
||||
case EXCCODE_INE:
|
||||
|
|
@ -121,7 +124,6 @@ static void loongarch_cpu_do_interrupt(CPUState *cs)
|
|||
case EXCCODE_FPE:
|
||||
case EXCCODE_SXD:
|
||||
case EXCCODE_ASXD:
|
||||
case EXCCODE_BCE:
|
||||
case EXCCODE_ADEM:
|
||||
case EXCCODE_PIL:
|
||||
case EXCCODE_PIS:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue