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

rewriter: support the 6 x86 param regs for post condition functions #471

Merged
merged 4 commits into from
Dec 18, 2024

Conversation

kkysen
Copy link
Contributor

@kkysen kkysen commented Nov 22, 2024

This is done by pushing the param regs onto the stack in the prologue (if there's a post condition function), and then popping them before we call the post condition function.

Next we'll work on supporting more than the 6 param regs, as well as passing the return value.

@kkysen kkysen requested a review from ayrtonm November 22, 2024 02:58
@kkysen kkysen force-pushed the kkysen/call-gate-post-condition-6-param-regs branch from ced7990 to fa355e9 Compare November 22, 2024 10:09
@ayrtonm
Copy link
Contributor

ayrtonm commented Nov 22, 2024

Next we'll work on supporting more than the 6 param regs, as well as passing the return value

Before either of these things I think we should explore what the checks themselves will look like. So trying out ways of allowing a developer to opt-in to simple checks or providing a way to specify their own more specific checks.

In general I'd like us to have a more clear picture of what this looks like/maybe have an "end-to-end" demo or test before fixing the details like passing in arguments correctly for all possible function signatures. The same goes for return values although we may want to handle that earlier to support checks that are conditional on the return value.

@kkysen kkysen force-pushed the kkysen/call-gate-post-condition-6-param-regs branch from fa355e9 to 54dbe7e Compare November 25, 2024 14:21
@kkysen kkysen force-pushed the kkysen/call-gate-post-condition-call branch from 8a8db26 to 94bbdb3 Compare November 25, 2024 14:23
@kkysen kkysen force-pushed the kkysen/call-gate-post-condition-6-param-regs branch from 54dbe7e to b24b1bc Compare November 25, 2024 14:27
Copy link
Contributor

@ayrtonm ayrtonm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some minor comments, but codegen changes LGTM

@kkysen kkysen force-pushed the kkysen/call-gate-post-condition-6-param-regs branch from b24b1bc to d1ce1e0 Compare December 16, 2024 09:27
@kkysen kkysen force-pushed the kkysen/call-gate-post-condition-call branch from 94bbdb3 to 82a087d Compare December 16, 2024 09:28
@kkysen kkysen force-pushed the kkysen/call-gate-post-condition-6-param-regs branch from d1ce1e0 to 40bbda3 Compare December 16, 2024 10:14
Base automatically changed from kkysen/call-gate-post-condition-call to main December 18, 2024 18:48
This is done by pushing the param regs onto the stack in the prologue
(if there's a post condition function), and then
popping them before we call the post condition function.

Next we'll work on supporting more than the 6 param regs,
as well as passing the return value.
…ich isn't supported yet

This is a fatal error (ICE) since the caller can just set `--no-enable-dav1d_get_picture-post-condition`.
@kkysen kkysen force-pushed the kkysen/call-gate-post-condition-6-param-regs branch from 1dcaf11 to 5eaa9bc Compare December 18, 2024 18:50
@kkysen kkysen merged commit a13b2b2 into main Dec 18, 2024
34 checks passed
@kkysen kkysen deleted the kkysen/call-gate-post-condition-6-param-regs branch December 18, 2024 21:32
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.

2 participants