mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
b711de9565
commit
73b01960b4
9 changed files with 47 additions and 47 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue