Repository navigation
feat(libc): implement ffs, ffsl, ffsll, fls and flsll bit search functions - #11494
Conversation
Progress report (88795ed → 91d5a05)📈 System libraries: 51.12% (+0.02%, +5 implemented functions) ✅ 5 implemented
Changed libraries (implemented exports)
|
MarcZX10
left a comment
There was a problem hiding this comment.
I reviewed the exact head . The bit-index arithmetic is consistent with the BSD / convention: zero returns 0, otherwise indices are one-based; converting signed inputs to the corresponding unsigned width preserves the sign-bit cases. The added cases cover zero, low/high bits, all-ones and signed minima. The conventions check and pass on this head. I could not run locally: the available configured build is relinker-only, and the hosted Linux/Windows product jobs are skipped by path policy. The relinker/ASan matrix is still completing, so those jobs are not evidence for the libc test.\n\nThe branch is based on , while current is . CONTRIBUTING.md asks branches to stay up to date with . The intervening main changes do not touch these three files, and I found no implementation defect in this review, but please sync the branch and rerun the focused test before approval.
|
Correction to my review body above: its inline-code formatting was stripped by the shell, so the displayed text omitted identifiers. The intended findings are: I reviewed head 5b1905f; the ffs/fls bit-index arithmetic is consistent with BSD convention (zero -> 0, otherwise one-based), and the unsigned conversions cover signed-minimum cases. Conventions and git diff --check pass. I could not run guest_wide_strings locally because the available build is relinker-only; hosted Linux/Windows product jobs are skipped by path policy. Current main is 88795ed, while this branch is based on 48c160c. CONTRIBUTING.md requires branches to stay current. The intervening main changes do not touch these three files. Please sync and run guest_wide_strings; I found no code defect, but the sync/test condition remains before approval. |
5b1905f to
91d5a05
Compare
|
Synced to current upstream main (88795ed), re-verified conventions check, and confirmed tests pass on the updated head. |
MarcZX10
left a comment
There was a problem hiding this comment.
Thanks for syncing. I fetched exact head 91d5a05; its merge-base is current main 88795ed. I compiled the changed Strings.cpp with the PR header and ran a focused harness comparing all five functions against independent std::bit expectations for 100,000 generated 32/64-bit patterns plus INT_MIN, INT64_MIN and LLONG_MIN. The harness passed. Current-main conventions and git diff --check pass; the published Windows test report is consistent with this result. The hosted relinker jobs are still running and product Linux/Windows jobs are skipped by path policy; those checks do not exercise the libc changes. No defect found; approved.
MarcZX10
left a comment
There was a problem hiding this comment.
Thanks for syncing. I fetched exact head 91d5a05; its merge-base is current main 88795ed. I compiled the changed Strings.cpp with the PR header and ran a focused harness comparing all five functions against independent std::bit expectations for 100,000 generated 32/64-bit patterns plus INT_MIN, INT64_MIN and LLONG_MIN. The harness passed. Current-main conventions and git diff --check pass; the published Windows test report is consistent with this result. Hosted product Linux/Windows tests are skipped by path policy. No implementation defect found; approved.
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
I manually checked the incomplete overlap warnings against the PR-file patches: #11341 changes only the |
What
Implement FreeBSD/POSIX bit search operations
ffs,ffsl,ffsll,fls, andflsllinlibcusing C++20std::countr_zeroandstd::countl_zero.Tested
Windows 11 x86_64, unit tests in
GuestWideStrings.cppexercising zero, power-of-two, signed boundaries (INT_MIN,INT64_MIN,LLONG_MIN), arbitrary bit patterns, and all-ones (-1) for each routine.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)