diff options
author | Karl Williamson <khw@cpan.org> | 2021-07-20 11:51:59 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-07-30 05:41:28 -0600 |
commit | 19d2c525bfed3f9eea1099e6eb745dbb50ca818b (patch) | |
tree | a54fc03ca6f4b1fdf8157d9b29b7747e50b0d198 /embed.fnc | |
parent | 58ddb8c5c1121d947ee72818b81ee254edb17699 (diff) | |
download | perl-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.fnc')
-rw-r--r-- | embed.fnc | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1142,8 +1142,10 @@ ATidRp |bool |is_utf8_invariant_string_loc|NN const U8* const s \ |STRLEN len \ |NULLOK const U8 ** ep CTiRp |unsigned|single_1bit_pos32|U32 word +CTiRp |unsigned|lsbit_pos32|U32 word #ifdef U64TYPE /* HAS_QUAD undefined outside of core */ CTiRp |unsigned|single_1bit_pos64|U64 word +CTiRp |unsigned|lsbit_pos64|U64 word #endif #ifndef EBCDIC CTiRp |unsigned int|variant_byte_number|PERL_UINTMAX_T word |