Last active
April 21, 2026 11:05
-
-
Save Validark/05420622fdf08bfb68083dff46d41725 to your computer and use it in GitHub Desktop.
`cls` on Arm
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
| export fn cls(x: u64) u64 { | |
| return @clz(((-%(x >> 63) ^ x) << 1) | 1); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment