mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
cpu_single_env usage fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1644 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
173d6cfe51
commit
c68ea7043f
15 changed files with 129 additions and 88 deletions
|
@ -213,6 +213,7 @@ static const uint32_t intbit_to_level[32] = {
|
|||
|
||||
static void slavio_check_interrupts(void *opaque)
|
||||
{
|
||||
CPUState *env;
|
||||
SLAVIO_INTCTLState *s = opaque;
|
||||
uint32_t pending = s->intregm_pending;
|
||||
unsigned int i, max = 0;
|
||||
|
@ -226,16 +227,17 @@ static void slavio_check_interrupts(void *opaque)
|
|||
max = intbit_to_level[i];
|
||||
}
|
||||
}
|
||||
if (cpu_single_env->interrupt_index == 0) {
|
||||
env = first_cpu;
|
||||
if (env->interrupt_index == 0) {
|
||||
DPRINTF("Triggered pil %d\n", max);
|
||||
#ifdef DEBUG_IRQ_COUNT
|
||||
s->irq_count[max]++;
|
||||
#endif
|
||||
cpu_single_env->interrupt_index = TT_EXTINT | max;
|
||||
cpu_interrupt(cpu_single_env, CPU_INTERRUPT_HARD);
|
||||
env->interrupt_index = TT_EXTINT | max;
|
||||
cpu_interrupt(env, CPU_INTERRUPT_HARD);
|
||||
}
|
||||
else
|
||||
DPRINTF("Not triggered (pending %x), pending exception %x\n", pending, cpu_single_env->interrupt_index);
|
||||
DPRINTF("Not triggered (pending %x), pending exception %x\n", pending, env->interrupt_index);
|
||||
}
|
||||
else
|
||||
DPRINTF("Not triggered (pending %x), disabled %x\n", pending, s->intregm_disabled);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue