mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
PPC64: Fix alternate timebase
Fix the alternate time base the same way as the default timebase. SPR_ATBL should return a 64-bit value on 64 bit implementations. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
e3ea652962
commit
b711de9565
@ -92,9 +92,9 @@ uint32_t cpu_ppc_load_tbu (CPUState *env)
|
||||
return cpu_ppc_get_tb(env) >> 32;
|
||||
}
|
||||
|
||||
uint32_t cpu_ppc_load_atbl (CPUState *env)
|
||||
uint64_t cpu_ppc_load_atbl (CPUState *env)
|
||||
{
|
||||
return cpu_ppc_get_tb(env) & 0xFFFFFFFF;
|
||||
return cpu_ppc_get_tb(env);
|
||||
}
|
||||
|
||||
uint32_t cpu_ppc_load_atbu (CPUState *env)
|
||||
|
4
hw/ppc.c
4
hw/ppc.c
@ -463,7 +463,7 @@ void cpu_ppc_store_tbu (CPUState *env, uint32_t value)
|
||||
_cpu_ppc_store_tbu(env, value);
|
||||
}
|
||||
|
||||
uint32_t cpu_ppc_load_atbl (CPUState *env)
|
||||
uint64_t cpu_ppc_load_atbl (CPUState *env)
|
||||
{
|
||||
ppc_tb_t *tb_env = env->tb_env;
|
||||
uint64_t tb;
|
||||
@ -471,7 +471,7 @@ uint32_t cpu_ppc_load_atbl (CPUState *env)
|
||||
tb = cpu_ppc_get_tb(tb_env, qemu_get_clock(vm_clock), tb_env->atb_offset);
|
||||
LOG_TB("%s: tb %016" PRIx64 "\n", __func__, tb);
|
||||
|
||||
return tb & 0xFFFFFFFF;
|
||||
return tb;
|
||||
}
|
||||
|
||||
uint32_t cpu_ppc_load_atbu (CPUState *env)
|
||||
|
@ -1078,9 +1078,9 @@ uint32_t cpu_ppc_load_tbu (CPUState *env)
|
||||
return cpu_ppc_get_tb(env) >> 32;
|
||||
}
|
||||
|
||||
uint32_t cpu_ppc_load_atbl (CPUState *env)
|
||||
uint64_t cpu_ppc_load_atbl (CPUState *env)
|
||||
{
|
||||
return cpu_ppc_get_tb(env) & 0xFFFFFFFF;
|
||||
return cpu_ppc_get_tb(env);
|
||||
}
|
||||
|
||||
uint32_t cpu_ppc_load_atbu (CPUState *env)
|
||||
|
@ -745,7 +745,7 @@ uint64_t cpu_ppc_load_tbl (CPUPPCState *env);
|
||||
uint32_t cpu_ppc_load_tbu (CPUPPCState *env);
|
||||
void cpu_ppc_store_tbu (CPUPPCState *env, uint32_t value);
|
||||
void cpu_ppc_store_tbl (CPUPPCState *env, uint32_t value);
|
||||
uint32_t cpu_ppc_load_atbl (CPUPPCState *env);
|
||||
uint64_t cpu_ppc_load_atbl (CPUPPCState *env);
|
||||
uint32_t cpu_ppc_load_atbu (CPUPPCState *env);
|
||||
void cpu_ppc_store_atbl (CPUPPCState *env, uint32_t value);
|
||||
void cpu_ppc_store_atbu (CPUPPCState *env, uint32_t value);
|
||||
|
@ -78,7 +78,7 @@ target_ulong helper_load_tbu (void)
|
||||
|
||||
target_ulong helper_load_atbl (void)
|
||||
{
|
||||
return cpu_ppc_load_atbl(env);
|
||||
return (target_ulong)cpu_ppc_load_atbl(env);
|
||||
}
|
||||
|
||||
target_ulong helper_load_atbu (void)
|
||||
|
Loading…
Reference in New Issue
Block a user