projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70cbec0
)
sparc64: SPARC optimized __fls function
author
Vijay Kumar
<vijay.ac.kumar@oracle.com>
Wed, 11 Oct 2017 18:50:05 +0000
(12:50 -0600)
committer
David S. Miller
<davem@davemloft.net>
Wed, 15 Nov 2017 05:26:46 +0000
(14:26 +0900)
Defined SPARC optimized __fls using lzcnt opcode.
Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/lib/NG4fls.S
patch
|
blob
|
history
diff --git
a/arch/sparc/lib/NG4fls.S
b/arch/sparc/lib/NG4fls.S
index
bc17b65
..
2d0991e
100644
(file)
--- a/
arch/sparc/lib/NG4fls.S
+++ b/
arch/sparc/lib/NG4fls.S
@@
-18,3
+18,13
@@
ENTRY(NG4fls)
retl
sub %g3, %g2, %o0
ENDPROC(NG4fls)
+
+ENTRY(__NG4fls)
+ brz,pn %o0, 1f
+ LZCNT_O0_G2 !lzcnt %o0, %g2
+ mov 63, %g3
+ sub %g3, %g2, %o0
+1:
+ retl
+ nop
+ENDPROC(__NG4fls)