Repository navigation
1.1.0: memory mappings for JIT compilers, scheduling attributes, CPU feature bits - #1
Merged
Merged
Conversation
Emulators with a dynamic recompiler (PCSX ReARMed's ARM dynarec) need anonymous mmap, mprotect with PROT_EXEC and __clear_cache. The host ABI already has the page calls and the instruction cache flush; the SDK's module runtime now implements the C functions over them. - libc/include/sys/mman.h: PROT_*, MAP_SHARED/PRIVATE/FIXED/ANONYMOUS, MAP_FAILED, mmap, munmap, mprotect. - compiler-rt's bare-metal __clear_cache aborts at its first use: it is removed from the builtins, so the SDK runtime's one is the only one and code linked without it fails at link time.
Declarations portable code needs to compile against the NBT C library: pthread_attr_set/get of schedpolicy, schedparam and inheritsched (PTHREAD_INHERIT_SCHED, PTHREAD_EXPLICIT_SCHED), and Linux's ARM HWCAP/HWCAP2 bits for getauxval, which picolibc declares. The SDK's module runtime implements them: attributes unused, no optional CPU feature reported.
The SDK's module runtime implements 1.1.0's new declarations (mmap, mprotect, __clear_cache, scheduling attributes, getauxval) and its probe checks them. Move to the SDK's main once the branch merges.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.