From f003109f710bb39a78c27ce18aa10579340f5a3f Mon Sep 17 00:00:00 2001 From: Matheus Ferst Date: Tue, 11 Oct 2022 17:48:01 -0300 Subject: 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 Signed-off-by: Matheus Ferst Message-Id: <20221011204829.1641124-2-matheus.ferst@eldorado.org.br> Signed-off-by: Daniel Henrique Barboza --- target/ppc/misc_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'target/ppc/misc_helper.c') 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) */ -- cgit v1.1