mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-11 04:06:20 +00:00
![Bill Schmidt](/assets/img/avatar_default.png)
This patch provides the assembly support for setjmp/longjmp for use with the thread sanitizer. This is a big more complicated than for aarch64, because sibcalls are only legal under our ABIs if the TOC pointer is unchanged. Since the true setjmp function trashes the TOC pointer, and we have to leave the stack in a correct state, we emulate the setjmp function rather than branching to it. We also need to materialize the TOC for cases where the _setjmp code is called from libc. This is done differently under the ELFv1 and ELFv2 ABIs. llvm-svn: 255059