Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Fix #1977: always create RBP chains on Unix #4019

Merged
merged 1 commit into from
Apr 5, 2016

Commits on Apr 5, 2016

  1. Fix #1977: always create RBP chains on Unix

    The JIT will now always create RBP chains on Unix platforms. This includes in functions
    the use localloc.
    
    To do this, the VM is extended with a new Unix-only AMD64 unwind code: UWOP_SET_FPREG_LARGE.
    The existing unwind code which is used to establish a frame pointer, UWOP_SET_FPREG, requires
    that the frame pointer, when established, be no more than 240 bytes offset from the stack pointer.
    This doesn't work well for frames that use localloc. (Large frames without localloc are ok,
    because we don't report the frame pointer in the unwind info except for in functions with
    localloc or EnC.)
    
    The new unwind code has a 32-bit range. If used, UNWIND_INFO.FrameRegister
    must be set to the frame pointer register, and UNWIND_INFO.FrameOffset must be set to 15
    (its maximum value). This code is followed by two UNWIND_CODEs that are combined to form
    its 32-bit offset. The high 4 bits must be zero. This offset is then scaled by 16. This
    result is used as the FP register offset from SP at the time the frame pointer is established.
    BruceForstall committed Apr 5, 2016
    Configuration menu
    Copy the full SHA
    a3f23bd View commit details
    Browse the repository at this point in the history