Repository navigation
gh-131999: Add support for tvOS, visionOS and watchOS. - #159944
freakboy3742 wants to merge 2 commits into
Conversation
|
cc @DinoV It touches the mimalloc codebase also. |
| // but system registers are 64 bits. | ||
| uint64_t tp; MI_UNUSED(ofs); | ||
| #if defined(__APPLE__) // M1, issue #343 | ||
| __asm__ volatile ("mrs %0, tpidrro_el0\nbic %0, %0, #7" : "=r" (tcb)); |
There was a problem hiding this comment.
Could you add comment when you adding downstream code here
Something like:
// CPython: blahblahblach
There was a problem hiding this comment.
We need this when we upgrade mimalloc to the latest version
There was a problem hiding this comment.
Also any chance you could try and upstream this to mimalloc? It seems like it's moved around a little but I think it's here now: https://github.com/microsoft/mimalloc/blob/dev3/include/mimalloc/prim/prim-tls.h#L103C15-L103C19
If we can get it upstreamed into the v3 branch then when we upgrade it'll just be there.
There was a problem hiding this comment.
I've added a comment; and I've submitted microsoft/mimalloc#1444 to upstream the equivalent change in mimalloc v3.
Adds support for Apple's tvOS, visionOS and watchOS platforms. I've been maintaining these patches independently for a while; I figured I'd try to contribute them upstream.
The support is essentially identical to iOS support, but with different platform identifiers:
appletvosandappletvsimulatorxrosandxrsimulatorwatchosandwatchsimulatorwatchOS devices use an
arm64_32architecture that has 32 bit pointers, but 64 bit registers. tvOS and watchOS support both x86_64 and arm64 simulators; visionOS only supports arm64 simulators.The bulk of the patch (by volume) is the testbed projects and framework skeletons for each new platform.
Usage of the Platform scripts is the same as for iOS; e.g.:
python3 Platforms/Apple build tvOS all- build all architectures for tvOSpython3 Platforms/Apple test watchOS arm64-apple-watchos-simulator- test for a watchOS simulatorpython3 Platforms/Apple ci visionOS --fast-ci- Run a fast CI pass (building and running tests) for visionOS.