diff options
author | Karl Williamson <khw@cpan.org> | 2021-07-20 07:22:00 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-07-30 05:41:27 -0600 |
commit | 995a49544ee5d0b46679907f5ba9fe50be890438 (patch) | |
tree | e959e2c9eab948bb79a0fc8a676276ebf04b4c6b /embed.fnc | |
parent | bf874180e9a7a8fbb74ab7eaa5c683ecc5a6ffc7 (diff) | |
download | perl-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.fnc')
-rw-r--r-- | embed.fnc | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1142,6 +1142,9 @@ 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 +#ifdef U64TYPE /* HAS_QUAD undefined outside of core */ +CTiRp |unsigned|single_1bit_pos64|U64 word +#endif #ifndef EBCDIC CTiRp |unsigned int|variant_byte_number|PERL_UINTMAX_T word #endif |