summaryrefslogtreecommitdiff
path: root/embed.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-07-20 11:51:59 -0600
committerKarl Williamson <khw@cpan.org>2021-07-30 05:41:28 -0600
commit19d2c525bfed3f9eea1099e6eb745dbb50ca818b (patch)
treea54fc03ca6f4b1fdf8157d9b29b7747e50b0d198 /embed.h
parent58ddb8c5c1121d947ee72818b81ee254edb17699 (diff)
downloadperl-19d2c525bfed3f9eea1099e6eb745dbb50ca818b.tar.gz
Create and use 32 and 64 bit lsbit_pos() fcns
The existing code to determine the position of the least significant 1 bit in a word is extracted from variant_byte_number() and moved to a new function in preparation for being called from other places. A U32 version is created, and on 64 bit platforms, a second, parallel, version taking a U64 argument is also created. This is because future commits may care about the word size differences.
Diffstat (limited to 'embed.h')
-rw-r--r--embed.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/embed.h b/embed.h
index 416dbf3002..a2fc31f42f 100644
--- a/embed.h
+++ b/embed.h
@@ -302,6 +302,7 @@
#define load_module Perl_load_module
#endif
#define looks_like_number(a) Perl_looks_like_number(aTHX_ a)
+#define lsbit_pos32 Perl_lsbit_pos32
#define magic_dump(a) Perl_magic_dump(aTHX_ a)
#define markstack_grow() Perl_markstack_grow(aTHX)
#ifndef MULTIPLICITY
@@ -871,6 +872,7 @@
#define csighandler Perl_csighandler
#endif
#if defined(U64TYPE) /* HAS_QUAD undefined outside of core */
+#define lsbit_pos64 Perl_lsbit_pos64
#define single_1bit_pos64 Perl_single_1bit_pos64
#endif
#if defined(UNLINK_ALL_VERSIONS)