Commit 2b41ce5d authored by Vijay Kumar's avatar Vijay Kumar Committed by David S. Miller

sparc64: SPARC optimized __fls function

Defined SPARC optimized __fls using lzcnt opcode.
Signed-off-by: default avatarVijay Kumar <vijay.ac.kumar@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 70cbec0c
...@@ -18,3 +18,13 @@ ENTRY(NG4fls) ...@@ -18,3 +18,13 @@ ENTRY(NG4fls)
retl retl
sub %g3, %g2, %o0 sub %g3, %g2, %o0
ENDPROC(NG4fls) 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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment