Patchwork target-ppc: Don't use ulong type

login
register
mail settings
Submitter Andreas Färber
Date May 20, 2011, 8:13 p.m.
Message ID <1305922404-44379-1-git-send-email-andreas.faerber@web.de>
Download mbox | patch
Permalink /patch/96663/
State New
Headers show

Comments

Andreas Färber - May 20, 2011, 8:13 p.m.
ulong is undefined on Darwin. Use uintptr_t instead.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
---
 target-ppc/cpu.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 7a6a7df..8e4582f 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -1929,8 +1929,8 @@  static inline void cpu_set_tls(CPUState *env, target_ulong newtls)
 #if !defined(CONFIG_USER_ONLY)
 static inline int booke206_tlbe_id(CPUState *env, ppcemb_tlb_t *tlbe)
 {
-    ulong tlbel = (ulong)tlbe;
-    ulong tlbl = (ulong)env->tlb;
+    uintptr_t tlbel = (uintptr_t)tlbe;
+    uintptr_t tlbl = (uintptr_t)env->tlb;
 
     return (tlbel - tlbl) / sizeof(env->tlb[0]);
 }