[PATCH] Fix __builtin_setjmp in combination with sjlj exception handling.

Matthias Braun matze at braunis.de
Mon Apr 27 17:52:35 PDT 2015


Hi grosbach,

__builtin_setjmp in combination with the sjlj exception handling style was broken. This was caused by the strange decision to produce exception handling dispatch jump tables upon seeing the setjmp instruction. This resulted in __builtin_setjmp being broken on ARM because it tried to build those dispatch tables with no sjlj exception handling code being present.

Commit message: SJLJ exception handling expects the backends to emit dispatch jump
tables at the beginning of the function, we cannot reuse llvm.eh.sjlj.setjmp to trigger this effect or we get into trouble when __builtin_setjmp was used independently of exception handling.
To solve this issue a new llvm.eh.sjlj.setup_dispatch intrinsic is
introduces which is used instead of llvm.eh.sjlj.setjmp in the sjlj
exception handling style.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9313

Files:
  include/llvm/CodeGen/ISDOpcodes.h
  include/llvm/IR/Intrinsics.td
  lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
  lib/CodeGen/SjLjEHPrepare.cpp
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/ARM/ARMISelLowering.h
  lib/Target/ARM/ARMInstrInfo.td
  test/CodeGen/ARM/setjmp_longjmp.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9313.24520.patch
Type: text/x-patch
Size: 13270 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150428/7e32c4a3/attachment.bin>


More information about the llvm-commits mailing list