Skip to content

Cherry-picking swiftasync support to the new stable branch. #2321

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

Merged

Conversation

TNorthover
Copy link

No description provided.

This extends any frame record created in the function to include that
parameter, passed in X22.

The new record looks like [X22, FP, LR] in memory, and FP is stored with 0b0001
stored in bits 63:60 (CodeGen assumes they are 0b0000 in normal operation). The
effect of this is that tools walking the stack should expect to see one of
three values there:

  * 0b0000 => a normal, non-extended record with just [FP, LR]
  * 0b0001 => the extended record [X22, FP, LR]
  * 0b1111 => kernel space, and a non-extended record.

All other values are currently reserved.

If compiling for arm64e this context pointer is address-discriminated with the
discriminator 0xc31a and the DB (process-specific) key.

There is also an "i8** @llvm.swift.async.context.addr()" intrinsic providing
front-ends access to this slot (and forcing its creation initialized to nullptr
if necessary).
This translates to "swiftasync" LLVM attribute.
@TNorthover
Copy link
Author

@swift-ci please test

1 similar comment
@azharudd
Copy link

@swift-ci please test

@aschwaighofer
Copy link

@swift-ci Please test linux

1 similar comment
@xymus
Copy link

xymus commented Jan 13, 2021

@swift-ci Please test linux

@TNorthover
Copy link
Author

@swift-ci please test linux

@aschwaighofer
Copy link

@swift-ci Please test linux

@aschwaighofer
Copy link

The linux failures look unrelated to this PR and also occurred on a different PR here: https://ci.swift.org/job/apple-llvm-project-pr-linux/1825

@aschwaighofer aschwaighofer merged commit 120bf0c into swiftlang:apple/stable/20210107 Jan 14, 2021
xymus pushed a commit that referenced this pull request Jan 15, 2021
Cherry-picking swiftasync support to the new swift/rebranch branch.

(cherry picked from commit 120bf0c)
xymus added a commit that referenced this pull request Jan 15, 2021
Merge pull request #2321 from TNorthover/swiftasync-stable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants