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

Peter Smith via libc-commits libc-commits at lists.llvm.org
Tue May 28 02:57:20 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")]]
----------------
smithp35 wrote:

If multi-versioned symbols is referring to function multi-versioning then there is a beta version defined in https://arm-software.github.io/acle/main/acle.html#function-multi-versioning AFAIK it has been concentrating on AArch64 though.

Unlikely to be used in bare-metal cases like cortex-m0 though.

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


More information about the libc-commits mailing list