-
Notifications
You must be signed in to change notification settings - Fork 568
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
i#2350 rseq: Target start instead of handler #3791
Conversation
Changes the native execution of the rseq region to target the start of the sequence rather than the abort handler. This is done for two reasons: to support abort handlers which simply abort and do not restart, and to make it much easier in the future to run a copy of the sequence rather than rely on call-return semantics in the app code. Adds preservation of input registers, limited to general-purpose registers clearly read-before-written in the sequence. Documents the new restrictions. Tries to pick a better scratch register, though this should go away once we switch to using a local copy. Issue: #2350
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.
Tries to pick a better scratch register, though this should go away once we switch to using a local copy.
Don't we still need a scratch register for dcontext pointer and save/restore?
We won't need a register we can't restore, though: i.e., we won't need a dead register. |
I'm done. |
Changes the call* to go through TLS, avoiding the need for a dead register. Inserts register saving code at the very start, avoiding conflits with client (esp drreg) instrumentation. Adds attach handling. Inserts consistently before next_instr for end-of-rseq mangling.
PTAL |
LGTM! |
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.
It's good then
Changes the native execution of the rseq region to target the start of
the sequence rather than the abort handler. This is done for two
reasons: to support abort handlers which simply abort and do not
restart, and to make it much easier in the future to run a copy of the
sequence rather than rely on call-return semantics in the app code.
Adds preservation of input registers, limited to general-purpose
registers clearly read-before-written in the sequence. Documents the
new restrictions. Tries to pick a better scratch register, though
this should go away once we switch to using a local copy.
Issue: #2350