Skip to content

feat(libc): implement memrchr - #1592

Closed
MarcZX10 wants to merge 2 commits into
boykopovar:mainfrom
MarcZX10:feat/libc-memrchr
Closed

MarcZX10 wants to merge 2 commits into
boykopovar:mainfrom
MarcZX10:feat/libc-memrchr

Conversation

@MarcZX10

@MarcZX10 MarcZX10 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

What

Implement the byte-wise reverse search used by memrchr, including conversion of the search value to unsigned char. Add a dedicated guest test for repeated matches, bounded searches, high byte values, and misses.

Tested

Linux, GCC 12.2.0: guest_memrchr passed; conventions check and git diff --check passed.

Checklist

@MarcZX10
MarcZX10 force-pushed the feat/libc-memrchr branch 2 times, most recently from d7c1ab6 to 4f3f2e9 Compare October 8, 2026 14:09
@oneandonlydean

Copy link
Copy Markdown
Collaborator

No title reaches memrchr on main yet: the homebrew audit lists the import, but those titles stop earlier at other missing imports. Closing for now; reopen when it's a title's next stop on main, with the log line.

@Get-fix Get-fix mentioned this pull request Oct 10, 2026
9 tasks done
@Amirtheshwaran

Copy link
Copy Markdown
Contributor

@MarcZX100 heads-up: with #1848, #2090, #1772, #1650 and #1624 merged, PICO-8 for PS5 (PPSA99808) now stops at memrchr (5G2ONUzRgjY) on main, per @babyhuey's startup check on #1772: #1772 (comment). That's the condition Dean set for reopening this.

I had #1906 for the same import; yours came first, so I'll leave it to you. If you'd rather not pick it up, let me know and I'll reopen mine.

@LeandroLP23 LeandroLP23 mentioned this pull request Oct 11, 2026
9 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants