aboutsummaryrefslogtreecommitdiff
path: root/log2.s
diff options
context:
space:
mode:
Diffstat (limited to 'log2.s')
-rw-r--r--log2.s8
1 files changed, 8 insertions, 0 deletions
diff --git a/log2.s b/log2.s
new file mode 100644
index 0000000..63499e6
--- /dev/null
+++ b/log2.s
@@ -0,0 +1,8 @@
+ .section .text
+ .global log2lzcnt
+ .type log2lzcnt, @function
+log2lzcnt:
+ lzcnt %rdi, %rdi
+ movq $63, %rax
+ sub %rdi, %rax
+ ret