diff options
author | Matheus Ferst <matheus.ferst@eldorado.org.br> | 2022-10-11 17:48:01 -0300 |
---|---|---|
committer | Daniel Henrique Barboza <danielhb413@gmail.com> | 2022-10-28 13:15:22 -0300 |
commit | f003109f710bb39a78c27ce18aa10579340f5a3f (patch) | |
tree | 1b7ed6f95000cebf3467dbee189b8ef42c56477e /target/ppc/misc_helper.c | |
parent | bbd8dd5e45b831ef3fda585cf80d08f45cdaba95 (diff) | |
download | qemu-f003109f710bb39a78c27ce18aa10579340f5a3f.zip qemu-f003109f710bb39a78c27ce18aa10579340f5a3f.tar.gz qemu-f003109f710bb39a78c27ce18aa10579340f5a3f.tar.bz2 |
target/ppc: define PPC_INTERRUPT_* values directly
This enum defines the bit positions in env->pending_interrupts for each
interrupt. However, except for the comparison in kvmppc_set_interrupt,
the values are always used as (1 << PPC_INTERRUPT_*). Define them
directly like that to save some clutter. No functional change intended.
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20221011204829.1641124-2-matheus.ferst@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Diffstat (limited to 'target/ppc/misc_helper.c')
-rw-r--r-- | target/ppc/misc_helper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/target/ppc/misc_helper.c b/target/ppc/misc_helper.c index b0a5e7c..05e3557 100644 --- a/target/ppc/misc_helper.c +++ b/target/ppc/misc_helper.c @@ -163,7 +163,7 @@ target_ulong helper_load_dpdes(CPUPPCState *env) helper_hfscr_facility_check(env, HFSCR_MSGP, "load DPDES", HFSCR_IC_MSGP); /* TODO: TCG supports only one thread */ - if (env->pending_interrupts & (1 << PPC_INTERRUPT_DOORBELL)) { + if (env->pending_interrupts & PPC_INTERRUPT_DOORBELL) { dpdes = 1; } @@ -185,10 +185,10 @@ void helper_store_dpdes(CPUPPCState *env, target_ulong val) } if (val & 0x1) { - env->pending_interrupts |= 1 << PPC_INTERRUPT_DOORBELL; + env->pending_interrupts |= PPC_INTERRUPT_DOORBELL; cpu_interrupt(cs, CPU_INTERRUPT_HARD); } else { - env->pending_interrupts &= ~(1 << PPC_INTERRUPT_DOORBELL); + env->pending_interrupts &= ~PPC_INTERRUPT_DOORBELL; } } #endif /* defined(TARGET_PPC64) */ |