mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
cpu: Move exception_index field from CPU_COMMON to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
6f03bef0ff
commit
27103424c4
60 changed files with 389 additions and 319 deletions
|
@ -27,9 +27,9 @@
|
|||
|
||||
void openrisc_cpu_do_interrupt(CPUState *cs)
|
||||
{
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
OpenRISCCPU *cpu = OPENRISC_CPU(cs);
|
||||
CPUOpenRISCState *env = &cpu->env;
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
|
||||
env->epcr = env->pc;
|
||||
if (env->flags & D_FLAG) {
|
||||
|
@ -37,7 +37,7 @@ void openrisc_cpu_do_interrupt(CPUState *cs)
|
|||
env->sr |= SR_DSX;
|
||||
env->epcr -= 4;
|
||||
}
|
||||
if (env->exception_index == EXCP_SYSCALL) {
|
||||
if (cs->exception_index == EXCP_SYSCALL) {
|
||||
env->epcr += 4;
|
||||
}
|
||||
|
||||
|
@ -54,12 +54,12 @@ void openrisc_cpu_do_interrupt(CPUState *cs)
|
|||
env->tlb->cpu_openrisc_map_address_data = &cpu_openrisc_get_phys_nommu;
|
||||
env->tlb->cpu_openrisc_map_address_code = &cpu_openrisc_get_phys_nommu;
|
||||
|
||||
if (env->exception_index > 0 && env->exception_index < EXCP_NR) {
|
||||
env->pc = (env->exception_index << 8);
|
||||
if (cs->exception_index > 0 && cs->exception_index < EXCP_NR) {
|
||||
env->pc = (cs->exception_index << 8);
|
||||
} else {
|
||||
cpu_abort(env, "Unhandled exception 0x%x\n", env->exception_index);
|
||||
cpu_abort(env, "Unhandled exception 0x%x\n", cs->exception_index);
|
||||
}
|
||||
#endif
|
||||
|
||||
env->exception_index = -1;
|
||||
cs->exception_index = -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue