aboutsummaryrefslogtreecommitdiff
path: root/target/loongarch/op_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/loongarch/op_helper.c')
-rw-r--r--target/loongarch/op_helper.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/target/loongarch/op_helper.c b/target/loongarch/op_helper.c
index 568c071601..60335a05e2 100644
--- a/target/loongarch/op_helper.c
+++ b/target/loongarch/op_helper.c
@@ -49,14 +49,16 @@ target_ulong helper_bitswap(target_ulong v)
void helper_asrtle_d(CPULoongArchState *env, target_ulong rj, target_ulong rk)
{
if (rj > rk) {
- do_raise_exception(env, EXCCODE_BCE, 0);
+ env->CSR_BADV = rj;
+ do_raise_exception(env, EXCCODE_BCE, GETPC());
}
}
void helper_asrtgt_d(CPULoongArchState *env, target_ulong rj, target_ulong rk)
{
if (rj <= rk) {
- do_raise_exception(env, EXCCODE_BCE, 0);
+ env->CSR_BADV = rj;
+ do_raise_exception(env, EXCCODE_BCE, GETPC());
}
}