]> granicus.if.org Git - llvm/commit
[X86] Remove erroneous callsite offsetting in SJLJ landing pads
authorMartin Storsjo <martin@martin.st>
Wed, 27 Sep 2017 06:08:16 +0000 (06:08 +0000)
committerMartin Storsjo <martin@martin.st>
Wed, 27 Sep 2017 06:08:16 +0000 (06:08 +0000)
commit1c1a8893a99601406dd120f02cfb4b8c035a6b43
tree12041e7e2d93e1b5673b641a5f0f8dd98d4f3006
parent728eef59d3da24281f31274ad8d93ce7f61f7ca2
[X86] Remove erroneous callsite offsetting in SJLJ landing pads

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.

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

Differential Revision: https://reviews.llvm.org/D38251

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314276 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/sjlj-eh.ll