summaryrefslogtreecommitdiff
path: root/embed.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-07-20 07:22:00 -0600
committerKarl Williamson <khw@cpan.org>2021-07-30 05:41:27 -0600
commit995a49544ee5d0b46679907f5ba9fe50be890438 (patch)
treee959e2c9eab948bb79a0fc8a676276ebf04b4c6b /embed.h
parentbf874180e9a7a8fbb74ab7eaa5c683ecc5a6ffc7 (diff)
downloadperl-995a49544ee5d0b46679907f5ba9fe50be890438.tar.gz
Add 64bit single-1bit_pos()
This will prove useful in future commits on platforms that have 64 bit capability. The deBruijn sequence used here, taken from the internet, differs from the 32 bit one in how they treat a word with no set bits. But this is considered undefined behavior, so that difference is immaterial. Apparently figuring this out uses brute force methods, and so I decided to live with this difference, rather than to expend the time needed to bring them into sync.
Diffstat (limited to 'embed.h')
-rw-r--r--embed.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/embed.h b/embed.h
index 9418b6751a..416dbf3002 100644
--- a/embed.h
+++ b/embed.h
@@ -870,6 +870,9 @@
#if defined(PERL_USE_3ARG_SIGHANDLER)
#define csighandler Perl_csighandler
#endif
+#if defined(U64TYPE) /* HAS_QUAD undefined outside of core */
+#define single_1bit_pos64 Perl_single_1bit_pos64
+#endif
#if defined(UNLINK_ALL_VERSIONS)
#define unlnk(a) Perl_unlnk(aTHX_ a)
#endif