diff options
author | Alexander Graf <agraf@suse.de> | 2009-12-21 14:02:39 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2009-12-21 16:03:03 +0100 |
commit | 73b01960b4af0e75c955757034a91b6370a4edb8 (patch) | |
tree | c18182f35a0b9b787c26ac5f596c844011916b27 /target-ppc | |
parent | b711de9565d3c8f758956dfa96b648cc321577b6 (diff) |
PPC: Make DCR uint32_t
For what I know DCR is always 32 bits wide, so we should also use uint32_t to
pass it along the stacks.
This fixes a warning when compiling qemu-system-ppc64 with KVM enabled, making
it compile without --disable-werror
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-ppc')
-rw-r--r-- | target-ppc/cpu.h | 4 | ||||
-rw-r--r-- | target-ppc/helper.h | 4 | ||||
-rw-r--r-- | target-ppc/op_helper.c | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index ac93df115c..d15bba18d4 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -795,8 +795,8 @@ static inline uint64_t ppc_dump_gpr(CPUPPCState *env, int gprn) } /* Device control registers */ -int ppc_dcr_read (ppc_dcr_t *dcr_env, int dcrn, target_ulong *valp); -int ppc_dcr_write (ppc_dcr_t *dcr_env, int dcrn, target_ulong val); +int ppc_dcr_read (ppc_dcr_t *dcr_env, int dcrn, uint32_t *valp); +int ppc_dcr_write (ppc_dcr_t *dcr_env, int dcrn, uint32_t val); #define cpu_init cpu_ppc_init #define cpu_exec cpu_ppc_exec diff --git a/target-ppc/helper.h b/target-ppc/helper.h index 5cf6cd4501..40d4cedeac 100644 --- a/target-ppc/helper.h +++ b/target-ppc/helper.h @@ -359,8 +359,8 @@ DEF_HELPER_2(divo, tl, tl, tl) DEF_HELPER_2(divs, tl, tl, tl) DEF_HELPER_2(divso, tl, tl, tl) -DEF_HELPER_1(load_dcr, tl, tl); -DEF_HELPER_2(store_dcr, void, tl, tl) +DEF_HELPER_1(load_dcr, i32, i32); +DEF_HELPER_2(store_dcr, void, i32, i32) DEF_HELPER_1(load_dump_spr, void, i32) DEF_HELPER_1(store_dump_spr, void, i32) diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index cb191933ae..cea27f2b4d 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -1828,30 +1828,30 @@ target_ulong helper_602_mfrom (target_ulong arg) /* Embedded PowerPC specific helpers */ /* XXX: to be improved to check access rights when in user-mode */ -target_ulong helper_load_dcr (target_ulong dcrn) +uint32_t helper_load_dcr (uint32_t dcrn) { - target_ulong val = 0; + uint32_t val = 0; if (unlikely(env->dcr_env == NULL)) { qemu_log("No DCR environment\n"); helper_raise_exception_err(POWERPC_EXCP_PROGRAM, POWERPC_EXCP_INVAL | POWERPC_EXCP_INVAL_INVAL); } else if (unlikely(ppc_dcr_read(env->dcr_env, dcrn, &val) != 0)) { - qemu_log("DCR read error %d %03x\n", (int)dcrn, (int)dcrn); + qemu_log("DCR read error %d %03x\n", dcrn, dcrn); helper_raise_exception_err(POWERPC_EXCP_PROGRAM, POWERPC_EXCP_INVAL | POWERPC_EXCP_PRIV_REG); } return val; } -void helper_store_dcr (target_ulong dcrn, target_ulong val) +void helper_store_dcr (uint32_t dcrn, uint32_t val) { if (unlikely(env->dcr_env == NULL)) { qemu_log("No DCR environment\n"); helper_raise_exception_err(POWERPC_EXCP_PROGRAM, POWERPC_EXCP_INVAL | POWERPC_EXCP_INVAL_INVAL); } else if (unlikely(ppc_dcr_write(env->dcr_env, dcrn, val) != 0)) { - qemu_log("DCR write error %d %03x\n", (int)dcrn, (int)dcrn); + qemu_log("DCR write error %d %03x\n", dcrn, dcrn); helper_raise_exception_err(POWERPC_EXCP_PROGRAM, POWERPC_EXCP_INVAL | POWERPC_EXCP_PRIV_REG); } |