MMartin Storsjö[libunwind] Fix SEH unwinding on ARM
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[runtimes][NFC] Remove filenames at the top of the license notice We've stopped doing it in libc++ for a while now because these names would end up rotting as we move things around and copy/paste stuff. This cleans up all the existing files so as to stop the spreading as people copy-paste headers around. | 4 年前 | |
[libunwind][cmake] Create LIBUNWIND_INSTALL_INCLUDE_DIR CACHE PATH This is created on analogy with the other CACHE PATHs in this package, and other *_INSTALL_INCLUDE_DIR in other packages. The branching is adjusted to deduplicate some existing code, and likewise avoid having to define this new variable more than once. This will be used for D99484. Reviewed By: #libunwind, compnerd Differential Revision: https://reviews.llvm.org/D116873 | 4 年前 | |
[libunwind] Fix SEH unwinding on ARM Check __SEH__ when checking if ARM EHABI should be implied, similarly to 4a3722a2c3dff1fe885cc38bf43d3c095c9851e7 / D126866. Fix a warning by using the right format specifier (PRIxPTR instead of PRIx64), and add a double->float cast in a codepath that hasn't been built so far. This is enough to make SEH unwinding of itanium ABI exceptions on ARM mostly work - one specific issue is fixed in a separate follow-up patch. Differential Revision: https://reviews.llvm.org/D126867 | 4 年前 | |
[libunwind] Fix SEH unwinding on ARM Check __SEH__ when checking if ARM EHABI should be implied, similarly to 4a3722a2c3dff1fe885cc38bf43d3c095c9851e7 / D126866. Fix a warning by using the right format specifier (PRIxPTR instead of PRIx64), and add a double->float cast in a codepath that hasn't been built so far. This is enough to make SEH unwinding of itanium ABI exceptions on ARM mostly work - one specific issue is fixed in a separate follow-up patch. Differential Revision: https://reviews.llvm.org/D126867 | 4 年前 | |
[libunwind][AIX] implementation of the unwinder for AIX Summary: This patch contains the implementation of the unwinder for IBM AIX. AIX does not support the eh_frame section. Instead, the traceback table located at the end of each function provides the information for stack unwinding and EH. In this patch macro _LIBUNWIND_SUPPORT_TBTAB_UNWIND is used to guard code for AIX traceback table based unwinding. Function getInfoFromTBTable() and stepWithTBTable() are added to get the EH information from the traceback table and to step up the stack respectively. There are two kinds of LSDA information for EH on AIX, the state table and the range table. The state table is used by the previous version of the IBM XL compiler, i.e., xlC and xlclang++. The DWARF based range table is used by AIX clang++. The traceback table has flags to differentiate these cases. For the range table, relative addresses are calculated using a base of DW_EH_PE_datarel, which is the TOC base of the module where the function of the current frame belongs. Two personality routines are employed to handle these two different LSDAs, __xlcxx_personality_v0() for the state table and __xlcxx_personality_v1() for the range table. Since the traceback table does not have the information of the personality for the state table approach, its personality __xlcxx_personality_v0() is dynamically resolved as the handler for the state table. For the range table, the locations of the LSDA and its associated personality routine are found in the traceback table. Assembly code for 32- and 64-bit PowerPC in UnwindRegistersRestore.S and UnwindRegistersSave.S are modified so that it can be consumed by the GNU flavor assembler and the AIX assembler. The restoration of vector registers does not check VRSAVE on AIX because VRSAVE is not used in the AIX ABI. Reviewed by: MaskRay, compnerd, cebowleratibm, sfertile, libunwind Differential Revision: https://reviews.llvm.org/D100132 | 4 年前 | |
[ARM][libunwind] add PACBTI-M support for libunwind This patch implements the following: - Emit PACBTI-M build attributes in libunwind asm files - Authenticate LR in DWARF32 using PACBTI Use Armv8.1-M.Main PACBTI extension to authenticate the return address (stored in the LR register) before moving it to the PC (IP) register. The AUTG instruction is used with the candidate return address, the CFA, and the authentication code that is retrieved from the saved pseudo-register RA_AUTH_CODE. - Authenticate LR in EHABI using PACBTI Authenticate the contents of the LR register using Armv8.1-M.Main PACBTI extension. A new frame unwinding instruction is introduced (0xb4). This instruction pops out of the stack the return address authentication code, which is then used in conjunction with the SP and the next-to-be instruction pointer to perform authentication. This authentication code is popped into a new register, UNW_ARM_PSEUDO_PAC, which is a pseudo-register. This patch is part of a series that adds support for the PACBTI-M extension of the Armv8.1-M architecture, as detailed here: https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-1-m-pointer-authentication-and-branch-target-identification-extension The PACBTI-M specification can be found in the Armv8-M Architecture Reference Manual: https://developer.arm.com/documentation/ddi0553/latest The following people contributed to this patch: - Momchil Velikov - Victor Campos - Ties Stuij Reviewed By: #libunwind, danielkiss, mstorsjo Differential Revision: https://reviews.llvm.org/D112430 | 4 年前 | |
[runtimes][NFC] Remove filenames at the top of the license notice We've stopped doing it in libc++ for a while now because these names would end up rotting as we move things around and copy/paste stuff. This cleans up all the existing files so as to stop the spreading as people copy-paste headers around. | 4 年前 |