-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Some minimal support for Apple Silicon #36592
Conversation
src/signals-mach.c
Outdated
#elif defined(_CPU_AARCH64_) | ||
typedef arm_thread_state64_t host_thread_state_t; | ||
typedef arm_exception_state64_t host_exception_state_t; | ||
#define HOST_EXCEPTION_STATE ARM_EXCEPTION_STATE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: This should be ARM_EXCEPTION_STATE64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that a change from Apple that you are expecting? Or are you going to push a new version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll push a new version, there's still some other issues with it also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change makes sense, though I’m just assuming the signal handling is correct....
A few questions,
- Is it A64 only?
- What’s the actual chip and features? What’s apple’s way of detecting the features?
I’ve heard that it can boot Linux so checking it from there should be interesting (to see if Update ARM feature and CPU detection (supersedes #36464) #36485 detects it correctly).i assume it doesn’t have hwcap or at least not in the same way Linux does it. Does it at least support what Linux have with HWCAP_CPUID? Or is it like iOS where, as I read, you jus need to hard code the known hardware features of various Apple devices.
src/signals-mach.c
Outdated
#elif defined(_CPU_AARCH64_) | ||
typedef arm_thread_state64_t host_thread_state_t; | ||
typedef arm_exception_state64_t host_exception_state_t; | ||
#define HOST_EXCEPTION_STATE ARM_EXCEPTION_STATE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that a change from Apple that you are expecting? Or are you going to push a new version?
I believe so yes. Darwin has support for A32, but all recent iDevices are A64 and I believe there will never be an A32 mac.
The chip in the DTK is an Apple A12Z. I haven't figured out if there's any way to do feature detection. I need to look into that. |
With this and some hacks to various dependencies, Julia builds for Darwin ARM64. We don't get very far though, and quickly end up jumping into a bit of uninitialized JIT memory, so there's clearly more work to be done here. That said, let's take this one step at a time, so here's the few pieces that at least make it build.
Looks like we can feature detect via sysctl:
|
With this and some hacks to various dependencies, Julia builds for Darwin ARM64. We don't get very far though, and quickly end up jumping into a bit of uninitialized JIT memory, so there's clearly more work to be done here. That said, let's take this one step at a time, so here's the few pieces that at least make it build.
With this and some hacks to various dependencies, Julia builds for
Darwin ARM64. We don't get very far though, and quickly end up
jumping into a bit of uninitialized JIT memory, so there's clearly
more work to be done here. That said, let's take this one step at
a time, so here's the few pieces that at least make it build.