aboutsummaryrefslogtreecommitdiff
path: root/log2.s
diff options
context:
space:
mode:
authorhovertank3d <[email protected]>2025-01-17 15:52:03 +0100
committerhovertank3d <[email protected]>2025-01-17 15:52:03 +0100
commitdd4a4aaf8e7cab8e196f7452b8a3f89411cdf742 (patch)
treef8863c1c0c861b0a6ecaffc47053e62b0095324d /log2.s
parenta832581ccc15455428721a7893d825112d95cee8 (diff)
downloadlzcnt.space-dd4a4aaf8e7cab8e196f7452b8a3f89411cdf742.tar.xz
lzcnt.space-dd4a4aaf8e7cab8e196f7452b8a3f89411cdf742.zip
initial commit
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