This is an archive of the discontinued LLVM Phabricator instance.

[X86] Remove erroneous callsite offsetting in SJLJ landing pads
ClosedPublic

Authored by mstorsjo on Sep 25 2017, 12:59 PM.

Details

Summary

The callsite value is already stored indexed from 0 in the _Unwind_Context struct. When accessed via the functions _Unwind_GetIP and _Unwind_SetIP, the value is indexed from 1, but those functions handle the offseting. When reading directly from the struct here, we shouldn't subtract 1.

This matches the code generated by the ARM target, where SJLJ exception handling is used by default on iOS.

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Sep 25 2017, 12:59 PM
mstorsjo updated this revision to Diff 116599.Sep 25 2017, 1:11 PM

Updated a missed comment in the test.

To clarify further, I'll add this to the commit message:

This makes clang-built object files for 32 bit x86 mingw work when linked with libgcc/libstdc++.

compnerd accepted this revision.Sep 26 2017, 1:57 PM
This revision is now accepted and ready to land.Sep 26 2017, 1:57 PM
This revision was automatically updated to reflect the committed changes.