[libcxx-commits] [PATCH] D99913: [SystemZ][z/OS] Modify cxxabi to be compatible with existing z/OS runtime

Jonathan Crowther via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 5 19:50:34 PDT 2021


Jonathan.Crowther created this revision.
Jonathan.Crowther added reviewers: muiez, zibi, SeanP, libc++abi, libc++.
Herald added subscribers: kristof.beyls, mgorny.
Jonathan.Crowther requested review of this revision.
Herald added a project: libc++abi.
Herald added a subscriber: libcxx-commits.

This patch is to enable exception handling on the z/OS platform that is compatible with the existing z/OS runtime. This requires changes to some of the calling conventions of functions such as `scan_eh_tab` and the personality routine to match the z/OS API.  Additionally, it adds a z/OS specific unwind header to match the unwinder present on z/OS. No functionality of libcxxabi has been changed for other platforms.  There is some minor non functional refactoring to __gxx_personality_v0 for ARM ABI). With this patch the hope is we can add z/OS as a platform to perform testing on any C++ ABI changes.

There are two primary differences for the z/OS implementation. The first is that on z/OS the thrown object is added to a linked list of caught and uncaught exceptions. The unwinder uses the top one as the current exception it is trying to find the landing pad for. We have to pop the top exception after we get it’s landing pad for our unwinder to correctly get any subsequent rethrows or nested exception calls. The second difference is that the z/OS API is passed the LSDA directly to the personality routine instead of getting it from the unwinder using `_Unwind_GetLanguageSpecificdata`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99913

Files:
  libcxxabi/include/zos/unwind.h
  libcxxabi/src/CMakeLists.txt
  libcxxabi/src/cxa_exception.cpp
  libcxxabi/src/cxa_personality.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99913.335382.patch
Type: text/x-patch
Size: 7287 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210406/3ef68e86/attachment-0001.bin>


More information about the libcxx-commits mailing list