Commit 1698b74161e9bbcf36c5075fe5b8357024c4b5bb
1 parent
3430b0be
Fix compilation on 32 bits hosts (pb reported by Thiemo Seufer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2521 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
3 additions
and
4 deletions
target-ppc/op.c
@@ -720,7 +720,7 @@ void OPPROTO op_check_addo (void) | @@ -720,7 +720,7 @@ void OPPROTO op_check_addo (void) | ||
720 | void OPPROTO op_check_addo_64 (void) | 720 | void OPPROTO op_check_addo_64 (void) |
721 | { | 721 | { |
722 | if (likely(!(((uint64_t)T2 ^ (uint64_t)T1 ^ UINT64_MAX) & | 722 | if (likely(!(((uint64_t)T2 ^ (uint64_t)T1 ^ UINT64_MAX) & |
723 | - ((uint64_t)T2 ^ (uint64_t)T0) & (1UL << 63)))) { | 723 | + ((uint64_t)T2 ^ (uint64_t)T0) & (1ULL << 63)))) { |
724 | xer_ov = 0; | 724 | xer_ov = 0; |
725 | } else { | 725 | } else { |
726 | xer_so = 1; | 726 | xer_so = 1; |
target-ppc/op_helper.h
@@ -313,12 +313,11 @@ static inline int _do_cntlzd (uint64_t val) | @@ -313,12 +313,11 @@ static inline int _do_cntlzd (uint64_t val) | ||
313 | cnt++; | 313 | cnt++; |
314 | } | 314 | } |
315 | #else | 315 | #else |
316 | - uint32_t tmp; | ||
317 | /* Make it easier on 32 bits host machines */ | 316 | /* Make it easier on 32 bits host machines */ |
318 | if (!(val >> 32)) | 317 | if (!(val >> 32)) |
319 | - cnt = cntlzw(val) + 32; | 318 | + cnt = _do_cntlzw(val) + 32; |
320 | else | 319 | else |
321 | - cnt = cntlzw(val >> 32); | 320 | + cnt = _do_cntlzw(val >> 32); |
322 | #endif | 321 | #endif |
323 | return cnt; | 322 | return cnt; |
324 | } | 323 | } |