Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308084
b: refs/heads/master
c: 9f1d62b
h: refs/heads/master
v: v3
  • Loading branch information
Chris Metcalf committed May 25, 2012
1 parent 9e4927a commit 769d2f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: acd1a19e002790dd127b3ff86f95a4d269e7f1d0
refs/heads/master: 9f1d62bed7f015d11b9164078b7fea433b474114
12 changes: 6 additions & 6 deletions trunk/arch/tile/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ static inline int ffs(int x)
return __builtin_ffs(x);
}

static inline int fls64(__u64 w)
{
return (sizeof(__u64) * 8) - __builtin_clzll(w);
}

/**
* fls - find last set bit in word
* @x: the word to search
Expand All @@ -90,12 +95,7 @@ static inline int ffs(int x)
*/
static inline int fls(int x)
{
return (sizeof(int) * 8) - __builtin_clz(x);
}

static inline int fls64(__u64 w)
{
return (sizeof(__u64) * 8) - __builtin_clzll(w);
return fls64((unsigned int) x);
}

static inline unsigned int __arch_hweight32(unsigned int w)
Expand Down

0 comments on commit 769d2f1

Please sign in to comment.