-
Notifications
You must be signed in to change notification settings - Fork 307
Apple Silicon Support with Fibers Working #483
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
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4b40868
Port Io to Apple Sillicon
pouyakary 508c37e
Add cmake-install to the git ignore and update cmake-build
pouyakary ae761b7
fixed the fiber
pouyakary d419a80
no longer needed
pouyakary 92dff38
fix object tests
pouyakary 19190d8
removed cmake-build
pouyakary File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,4 +96,5 @@ Makefile | |
| IoInstallPrefix.h | ||
| xcuserdata | ||
| build | ||
| .idea | ||
| .idea | ||
| cmake-install | ||
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,22 @@ | ||
| // arm64-ucontext.h: Apple Silicon (ARM64) macOS context switching using ucontext | ||
| // arm64-ucontext.h: Apple Silicon (ARM64) coroutine context representation | ||
| #ifndef ARM64_UCONTEXT_H | ||
| #define ARM64_UCONTEXT_H | ||
|
|
||
| // Required for ucontext on modern macOS | ||
| #ifndef _XOPEN_SOURCE | ||
| #define _XOPEN_SOURCE 700 | ||
| #endif | ||
| #include <stdint.h> | ||
|
|
||
| #include <ucontext.h> | ||
| // Minimal register snapshot that matches the layout expected by | ||
| // `coro_arm64_getcontext`/`coro_arm64_setcontext` in asm.S. We only need to | ||
| // preserve the callee-saved registers along with the stack pointer. | ||
| typedef struct IoCoroARM64Context { | ||
| uint64_t x19_x20[2]; | ||
| uint64_t x21_x22[2]; | ||
| uint64_t x23_x24[2]; | ||
| uint64_t x25_x26[2]; | ||
| uint64_t x27_x28[2]; | ||
| uint64_t fp_lr[2]; | ||
| uint64_t sp; | ||
| } IoCoroARM64Context; | ||
|
|
||
| typedef ucontext_t arm64_ucontext_t; | ||
| typedef IoCoroARM64Context arm64_ucontext_t; | ||
|
|
||
| #endif // ARM64_UCONTEXT_H |
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
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
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.
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.
This change is incorrect. The original assert is correct; test is failing on MacOS (actually on AARCH64 Linux too) in release mode though it passes (for me anyway) in debug mode.
I have a patch to fix this but it is not quite ready yet (more testing needed)
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.
Ah sorry this is my bad 😞 Forgot to undo this 😔