[libc-commits] [libc] [libc][setjmp][x86] implement setjmp in terms of out of line asm (PR #88157)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Mon Apr 22 14:42:10 PDT 2024


================
@@ -0,0 +1,43 @@
+//===-- Implementation of setjmp --------------------------------*- ASM -*-===//
+//
+// 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/__support/assembly.h"
+#include "src/setjmp/x86_64/setjmp.h"
+
+#define paste(ns) _ZN22 ## ns ## 6setjmpEP9__jmp_buf
+#define expand(x) paste(x)
+#define LIBC_NAMESPACE_setjump expand(LIBC_NAMESPACE)
+// aka _ZN22__llvm_libc_19_0_0_git6setjmpEP9__jmp_buf
+// aka __llvm_libc_19_0_0_git::setjmp(__jmp_buf*)
+
+.global setjump
----------------
nickdesaulniers wrote:

221ef63fdafd

https://github.com/llvm/llvm-project/pull/88157


More information about the libc-commits mailing list