Created
May 20, 2014 18:50
-
-
Save Kern--/c5e175159036b57ba569 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static inline s32 lsbPosition(s32 a) { | |
| s32 ret; | |
| asm __volatile__("bitrev $0, %0; | |
| clz %1, $0;" | |
| : "=r"(ret) : "r"(a)); | |
| return ret; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment