mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
target/ppc: Merge helper_{dcbz,dcbzep}
Merge the two and pass the mmu_idx directly from translation. Swap the argument order in dcbz_common to avoid extra swaps. Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
62fe57c6d2
commit
c6d84fd7cf
3 changed files with 7 additions and 14 deletions
|
@ -271,7 +271,7 @@ void helper_stsw(CPUPPCState *env, target_ulong addr, uint32_t nb,
|
|||
}
|
||||
|
||||
static void dcbz_common(CPUPPCState *env, target_ulong addr,
|
||||
int dcbz_size, int mmu_idx, uintptr_t retaddr)
|
||||
int mmu_idx, int dcbz_size, uintptr_t retaddr)
|
||||
{
|
||||
target_ulong mask = ~(target_ulong)(dcbz_size - 1);
|
||||
void *haddr;
|
||||
|
@ -296,15 +296,9 @@ static void dcbz_common(CPUPPCState *env, target_ulong addr,
|
|||
}
|
||||
}
|
||||
|
||||
void helper_dcbz(CPUPPCState *env, target_ulong addr)
|
||||
void helper_dcbz(CPUPPCState *env, target_ulong addr, int mmu_idx)
|
||||
{
|
||||
dcbz_common(env, addr, env->dcache_line_size,
|
||||
ppc_env_mmu_index(env, false), GETPC());
|
||||
}
|
||||
|
||||
void helper_dcbzep(CPUPPCState *env, target_ulong addr)
|
||||
{
|
||||
dcbz_common(env, addr, env->dcache_line_size, PPC_TLB_EPID_STORE, GETPC());
|
||||
dcbz_common(env, addr, mmu_idx, env->dcache_line_size, GETPC());
|
||||
}
|
||||
|
||||
#ifdef TARGET_PPC64
|
||||
|
@ -320,7 +314,7 @@ void helper_dcbzl(CPUPPCState *env, target_ulong addr)
|
|||
dcbz_size = 32;
|
||||
}
|
||||
|
||||
dcbz_common(env, addr, dcbz_size, ppc_env_mmu_index(env, false), GETPC());
|
||||
dcbz_common(env, addr, ppc_env_mmu_index(env, false), dcbz_size, GETPC());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue