summaryrefslogtreecommitdiff
path: root/target/openrisc/exception_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/openrisc/exception_helper.c')
-rw-r--r--target/openrisc/exception_helper.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/target/openrisc/exception_helper.c b/target/openrisc/exception_helper.c
index 329a9e400b..7e54c978be 100644
--- a/target/openrisc/exception_helper.c
+++ b/target/openrisc/exception_helper.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/helper-proto.h"
+#include "exec/exec-all.h"
#include "exception.h"
void HELPER(exception)(CPUOpenRISCState *env, uint32_t excp)
@@ -28,3 +29,14 @@ void HELPER(exception)(CPUOpenRISCState *env, uint32_t excp)
raise_exception(cpu, excp);
}
+
+void HELPER(ove)(CPUOpenRISCState *env, target_ulong test)
+{
+ if (unlikely(test) && (env->sr & SR_OVE)) {
+ OpenRISCCPU *cpu = openrisc_env_get_cpu(env);
+ CPUState *cs = CPU(cpu);
+
+ cs->exception_index = EXCP_RANGE;
+ cpu_loop_exit_restore(cs, GETPC());
+ }
+}