repo.or.cz
/
linux-2.6
/
next.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
add port definition for mcf UART driver
[linux-2.6/next.git]
/
arch
/
parisc
/
lib
/
libgcc
/
__clzsi2.c
blob
a7aa2f55a9c681e2cd138b7c11bf73eebf3b09f0
1
#include
"libgcc.h"
2
3
u32
__clzsi2
(
u32 v
)
4
{
5
int
p
=
31
;
6
7
if
(
v
&
0xffff0000
) {
8
p
-=
16
;
9
v
>>=
16
;
10
}
11
if
(
v
&
0xff00
) {
12
p
-=
8
;
13
v
>>=
8
;
14
}
15
if
(
v
&
0xf0
) {
16
p
-=
4
;
17
v
>>=
4
;
18
}
19
if
(
v
&
0xc
) {
20
p
-=
2
;
21
v
>>=
2
;
22
}
23
if
(
v
&
0x2
) {
24
p
-=
1
;
25
v
>>=
1
;
26
}
27
28
return
p
;
29
}
30
EXPORT_SYMBOL
(
__clzsi2
);