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

noinline / notail as part of a function prototype #3217

Open
daurnimator opened this issue Sep 11, 2019 · 1 comment
Open

noinline / notail as part of a function prototype #3217

daurnimator opened this issue Sep 11, 2019 · 1 comment
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone

Comments

@daurnimator
Copy link
Collaborator

daurnimator commented Sep 11, 2019

I just recalled something from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66826

Now dlsym (and other dl-functions) secretly take shadow parameter - return address on stack

I wonder if we need to reflect this somehow?

Originally posted by @daurnimator in #2598

llvm has a notail annotation for function calls. this could be a possible use case for a @call() builtin. we could have an enum for Inline, NoInline, MustTail, and NoTail, and unify the builtin with @newStackCall.

Originally posted by @emekoi in #2598

I also would like to allow noinline (with the implication of notail) as part of a function prototype. This way functions such as dlsym can properly document how to call them, instead of being footguns at the callsites.

With this implemented, solving this problem would be as simple as adding "noinline" to the extern fn prototype.

Originally posted by @andrewrk in #2598

@andrewrk andrewrk added the proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. label Sep 11, 2019
@andrewrk andrewrk added this to the 0.6.0 milestone Sep 11, 2019
@andrewrk
Copy link
Member

Thanks for filing the issue 👍

@andrewrk andrewrk modified the milestones: 0.6.0, 0.7.0 Feb 13, 2020
@andrewrk andrewrk modified the milestones: 0.7.0, 0.8.0 Oct 27, 2020
@andrewrk andrewrk modified the milestones: 0.8.0, 0.9.0 May 19, 2021
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 Nov 23, 2021
@andrewrk andrewrk modified the milestones: 0.10.0, 0.11.0 Apr 16, 2022
@andrewrk andrewrk modified the milestones: 0.11.0, 0.12.0 Apr 9, 2023
@andrewrk andrewrk modified the milestones: 0.13.0, 0.12.0 Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Projects
None yet
Development

No branches or pull requests

2 participants