• Cherry Zhang's avatar
    runtime, cmd/internal/obj: get rid of rewindmorestack · 4c9a3729
    Cherry Zhang authored
    In the function prologue, we emit a jump to the beginning of
    the function immediately after calling morestack. And in the
    runtime stack growing code, it decodes and emulates that jump.
    This emulation was necessary before we had per-PC SP deltas,
    since the traceback code assumed that the frame size was fixed
    for the whole function, except on the first instruction where
    it was 0. Since we now have per-PC SP deltas and PCDATA, we
    can correctly record that the frame size is 0. This makes the
    emulation unnecessary.
    
    This may be helpful for registerized calling convention, where
    there may be unspills of arguments after calling morestack. It
    also simplifies the runtime.
    
    Change-Id: I7ebee31eaee81795445b33f521ab6a79624c4ceb
    Reviewed-on: https://go-review.googlesource.com/30138Reviewed-by: default avatarDavid Chase <drchase@google.com>
    4c9a3729
obj9.go 26.8 KB