Skip to content

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

@ishitatsuyuki

Description

@ishitatsuyuki

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions