diff options
Diffstat (limited to 'target')
-rw-r--r-- | target/nios2/cpu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c index 52ebda8..58688e1 100644 --- a/target/nios2/cpu.c +++ b/target/nios2/cpu.c @@ -71,8 +71,7 @@ static void nios2_cpu_set_irq(void *opaque, int irq, int level) CPUNios2State *env = &cpu->env; CPUState *cs = CPU(cpu); - env->regs[CR_IPENDING] &= ~(1 << irq); - env->regs[CR_IPENDING] |= !!level << irq; + env->regs[CR_IPENDING] = deposit32(env->regs[CR_IPENDING], irq, 1, !!level); env->irq_pending = env->regs[CR_IPENDING] & env->regs[CR_IENABLE]; |