Skip to content

Commit c06ba89

Browse files
Lucas Mateus Castro (alqotel)dgibson
authored andcommitted
target/ppc: moved store_40x_sler to helper_regs.c
moved store_40x_sler from mmu_common.c to helper_regs.c as it is a function to store a value in a special purpose register, so moving it to a file focused in special register manipulation is more appropriate. Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br> Message-Id: <20210723175627.72847-4-lucas.araujo@eldorado.org.br> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
1 parent d6ae8ec commit c06ba89

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

target/ppc/helper_regs.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,18 @@ int hreg_store_msr(CPUPPCState *env, target_ulong value, int alter_hv)
258258
return excp;
259259
}
260260

261+
#ifdef CONFIG_SOFTMMU
262+
void store_40x_sler(CPUPPCState *env, uint32_t val)
263+
{
264+
/* XXX: TO BE FIXED */
265+
if (val != 0x00000000) {
266+
cpu_abort(env_cpu(env),
267+
"Little-endian regions are not supported by now\n");
268+
}
269+
env->spr[SPR_405_SLER] = val;
270+
}
271+
#endif /* CONFIG_SOFTMMU */
272+
261273
#ifndef CONFIG_USER_ONLY
262274
void check_tlb_flush(CPUPPCState *env, bool global)
263275
{

target/ppc/mmu_common.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -622,16 +622,6 @@ static int mmu40x_get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx,
622622
return ret;
623623
}
624624

625-
void store_40x_sler(CPUPPCState *env, uint32_t val)
626-
{
627-
/* XXX: TO BE FIXED */
628-
if (val != 0x00000000) {
629-
cpu_abort(env_cpu(env),
630-
"Little-endian regions are not supported by now\n");
631-
}
632-
env->spr[SPR_405_SLER] = val;
633-
}
634-
635625
static int mmubooke_check_tlb(CPUPPCState *env, ppcemb_tlb_t *tlb,
636626
hwaddr *raddr, int *prot, target_ulong address,
637627
MMUAccessType access_type, int i)

0 commit comments

Comments
 (0)