[libc-commits] [libc] [libc][arm] implement a basic setjmp/longjmp (PR #93220)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Fri May 31 15:46:06 PDT 2024


================
@@ -0,0 +1,59 @@
+//===-- Implementation of setjmp ------------------------------------------===//
+//
+// 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/common.h"
+#include "src/setjmp/setjmp_impl.h"
+
+namespace LIBC_NAMESPACE {
+
+#if defined(__thumb__) && __ARM_ARCH_ISA_THUMB == 1
+
+[[gnu::naked, gnu::target("thumb")]]
----------------
nickdesaulniers wrote:

Right, depends on loader support, which we currently lack.  Also, not sure yet we _want_ to support a libc with mixed arm/thumb mode support.  Frankly, I'd suspect that folks that _care_ about libc support on 32b ARM only really care about Thumb mode (unless they're running on some variant with only ARM mode support).

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


More information about the libc-commits mailing list