Patchwork [3/5] target-alpha: Fix generic ctz64.

login
register
mail settings
Submitter Richard Henderson
Date Dec. 14, 2009, 1:47 a.m.
Message ID <9f0e1c5d35eb4d290411d9b1b7a925fb0bc5ddac.1260755765.git.rth@twiddle.net>
Download mbox | patch
Permalink /patch/41056/
State New
Headers show

Comments

Richard Henderson - Dec. 14, 2009, 1:47 a.m.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 host-utils.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/host-utils.h b/host-utils.h
index e335c5c..0ddc176 100644
--- a/host-utils.h
+++ b/host-utils.h
@@ -164,7 +164,7 @@  static inline int ctz64(uint64_t val)
 {
 #if QEMU_GNUC_PREREQ(3, 4)
     if (val)
-        return __builtin_ctz(val);
+        return __builtin_ctzll(val);
     else
         return 64;
 #else