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:
Aurelien Jarno 2009-12-21 13:52:08 +01:00
parent e3ea652962
commit b711de9565
5 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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);

View File

@ -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)