Skip to content
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

Should not the context register be saved as well? #9

Closed
flockoffiles opened this issue Nov 7, 2018 · 3 comments
Closed

Should not the context register be saved as well? #9

flockoffiles opened this issue Nov 7, 2018 · 3 comments

Comments

@flockoffiles
Copy link

I was wondering whether r13 (the call context register) be saved as well (inside the assembly code)?
See: https://reverseengineering.stackexchange.com/questions/15725/calling-swift-4-methods-from-c
And: https://github.com/apple/swift/blob/master/docs/ABIStabilityManifesto.md#calling-convention

@johnno1962
Copy link
Owner

Thanks for this, you may be right. Looks like this was something added in Swift 4.

@flockoffiles
Copy link
Author

By the way, thanks so much for the awesome component! I was trying to understand Swift vtables by just reading their docs, but having a live example is a life saver!

@johnno1962
Copy link
Owner

I’ve just pushed an update which should resolve this. %r13 is used for self and %rax used for structs

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

No branches or pull requests

2 participants