Commit 706b0a15876ccdd7b702c46a6c1d25ff68fcd5b9
1 parent
59fdb018
Avoid compiler warning.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4844 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
1 deletions
cpu-all.h
@@ -667,7 +667,7 @@ static inline void stfq_be_p(void *ptr, float64 v) | @@ -667,7 +667,7 @@ static inline void stfq_be_p(void *ptr, float64 v) | ||
667 | 667 | ||
668 | /* All direct uses of g2h and h2g need to go away for usermode softmmu. */ | 668 | /* All direct uses of g2h and h2g need to go away for usermode softmmu. */ |
669 | #define g2h(x) ((void *)((unsigned long)(x) + GUEST_BASE)) | 669 | #define g2h(x) ((void *)((unsigned long)(x) + GUEST_BASE)) |
670 | -#define h2g(x) ((target_ulong)(x - GUEST_BASE)) | 670 | +#define h2g(x) ((target_ulong)((unsigned long)(x) - GUEST_BASE)) |
671 | 671 | ||
672 | #define saddr(x) g2h(x) | 672 | #define saddr(x) g2h(x) |
673 | #define laddr(x) g2h(x) | 673 | #define laddr(x) g2h(x) |