mirror of
https://github.com/qemu/qemu.git
synced 2025-08-15 22:31:15 +00:00
w32: Fix compilation and replace non-portable usage of ulong
ulong is undefined for w32 (and maybe other) compilations. Replace it by uintptr_t (which also fixes compilation for w64 and is a better choice for pointer to integer conversions). Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
1fddfba129
commit
6d42fb313b
@ -1929,8 +1929,8 @@ static inline void cpu_set_tls(CPUState *env, target_ulong newtls)
|
|||||||
#if !defined(CONFIG_USER_ONLY)
|
#if !defined(CONFIG_USER_ONLY)
|
||||||
static inline int booke206_tlbe_id(CPUState *env, ppcemb_tlb_t *tlbe)
|
static inline int booke206_tlbe_id(CPUState *env, ppcemb_tlb_t *tlbe)
|
||||||
{
|
{
|
||||||
ulong tlbel = (ulong)tlbe;
|
uintptr_t tlbel = (uintptr_t)tlbe;
|
||||||
ulong tlbl = (ulong)env->tlb;
|
uintptr_t tlbl = (uintptr_t)env->tlb;
|
||||||
|
|
||||||
return (tlbel - tlbl) / sizeof(env->tlb[0]);
|
return (tlbel - tlbl) / sizeof(env->tlb[0]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user