[libc-commits] [libc] [libc] implement sigsetjmp/siglongjmp for x86-64 (PR #136072)
Schrodinger ZHU Yifan via libc-commits
libc-commits at lists.llvm.org
Thu Apr 17 06:07:28 PDT 2025
================
@@ -0,0 +1,25 @@
+//===-- Implementation of sigsetjmp_epilogue ------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/setjmp/sigsetjmp_epilogue.h"
+#include "src/__support/OSUtil/syscall.h"
+#include "src/__support/common.h"
+#include <sys/syscall.h> // For syscall numbers.
+
+namespace LIBC_NAMESPACE_DECL {
+[[gnu::returns_twice]] int sigsetjmp_epilogue(jmp_buf buffer, int retval) {
----------------
SchrodingerZhu wrote:
Yes, it is an internal routine shared on different arch. I made it in an `add_object_library` rather than `add_entrypoint_object`
https://github.com/llvm/llvm-project/pull/136072
More information about the libc-commits
mailing list