summaryrefslogtreecommitdiff
path: root/target-openrisc/exception.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-openrisc/exception.c')
-rw-r--r--target-openrisc/exception.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/target-openrisc/exception.c b/target-openrisc/exception.c
index 58e53c6c98..74652a58f6 100644
--- a/target-openrisc/exception.c
+++ b/target-openrisc/exception.c
@@ -22,6 +22,8 @@
void QEMU_NORETURN raise_exception(OpenRISCCPU *cpu, uint32_t excp)
{
- cpu->env.exception_index = excp;
- cpu_loop_exit(&cpu->env);
+ CPUState *cs = CPU(cpu);
+
+ cs->exception_index = excp;
+ cpu_loop_exit(cs);
}