mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 06:43:53 -06:00
hw/ppc: moved has_spr to cpu.h
Moved has_spr to cpu.h as ppc_has_spr and turned it into an inline function. Change spr verification in pnv.c and spapr.c to a version that can compile in a !TCG environment. Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br> Message-Id: <20210507164146.67086-1-lucas.araujo@eldorado.org.br> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
45998ffcb4
commit
03282a3ab8
4 changed files with 12 additions and 12 deletions
|
@ -2642,6 +2642,12 @@ static inline ppc_avr_t *cpu_avr_ptr(CPUPPCState *env, int i)
|
|||
return (ppc_avr_t *)((uintptr_t)env + avr_full_offset(i));
|
||||
}
|
||||
|
||||
static inline bool ppc_has_spr(PowerPCCPU *cpu, int spr)
|
||||
{
|
||||
/* We can test whether the SPR is defined by checking for a valid name */
|
||||
return cpu->env.spr_cb[spr].name != NULL;
|
||||
}
|
||||
|
||||
void dump_mmu(CPUPPCState *env);
|
||||
|
||||
void ppc_maybe_bswap_register(CPUPPCState *env, uint8_t *mem_buf, int len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue