diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2009-12-21 13:52:08 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2009-12-21 13:52:08 +0100 |
commit | cb7784b4d050527c7745c207159c4ad01534de7c (patch) | |
tree | 75cfacb2e5563a009e6cc7e6618f476dd45c0845 | |
parent | fdb40e9a63ec610fee99a5be7d5a4544e23d6d98 (diff) | |
download | qemu-cb7784b4d050527c7745c207159c4ad01534de7c.tar.gz qemu-cb7784b4d050527c7745c207159c4ad01534de7c.tar.bz2 qemu-cb7784b4d050527c7745c207159c4ad01534de7c.zip |
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>
-rw-r--r-- | darwin-user/main.c | 4 | ||||
-rw-r--r-- | hw/ppc.c | 4 | ||||
-rw-r--r-- | linux-user/main.c | 4 | ||||
-rw-r--r-- | target-ppc/cpu.h | 2 | ||||
-rw-r--r-- | target-ppc/op_helper.c | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/darwin-user/main.c b/darwin-user/main.c index 2f4a0f827b..d83e1c172e 100644 --- a/darwin-user/main.c +++ b/darwin-user/main.c @@ -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) @@ -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) diff --git a/linux-user/main.c b/linux-user/main.c index 5aa9daceb6..445bfc76b6 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -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) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 2dc301d1e3..ac93df115c 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -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); diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index e7bcd71f97..cb191933ae 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -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) |