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

PE: Add fast path for base pointers (RBP with offset) #23

Open
ishitatsuyuki opened this issue Mar 1, 2024 · 0 comments
Open

PE: Add fast path for base pointers (RBP with offset) #23

ishitatsuyuki opened this issue Mar 1, 2024 · 0 comments

Comments

@ishitatsuyuki
Copy link
Contributor

Pretty frequently compilers will establish a frame pointer when it's beneficial for reducing rsp manipulation. MSVC is additionally known to set RBPs to a constant offset from what is known as a "frame pointer". This will also happen with Clang if both stack realignment and alloca is involved.

We should have a new unwind rule, generalizing frame pointers, defined by:

    /// (sp, bp) = (bp + 8x, *(bp + 8y))
    UseBasePointer {
        sp_offset_from_bp_by_8: u16,
        bp_storage_offset_from_bp_by_8: i16,
    },

When x=2, y=0 this is equivalent to a frame pointer.

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

1 participant