Schrodinger ZHU Yifan
9ebaa9d483
[libc] implement aarch64 sigsetjmp (#136706)
- **[libc][aarch64] implement sigsetjmp**
On top of https://github.com/llvm/llvm-project/pull/136072
See also https://github.com/llvm/llvm-project/issues/137055 for remarks
on naked attributes.
```c++
//===-- 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/setjmp/sigsetjmp.h"
#include "hdr/offsetof_macros.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
#include "src/setjmp/setjmp_impl.h"
#include "src/setjmp/sigsetjmp_epilogue.h"
namespace LIBC_NAMESPACE_DECL {
[[gnu::naked]]
LLVM_LIBC_FUNCTION(int, sigsetjmp, (sigjmp_buf, int)) {
asm(R"(
cbz w1, %c[setjmp]
str x30, [x0, %c[retaddr]]
str x19, [x0, %c[extra]]
mov x19, x0
bl %c[setjmp]
mov w1, w0
mov x0, x19
ldr x30, [x0, %c[retaddr]]
ldr x19, [x0, %c[extra]]
b %c[epilogue])" ::[retaddr] "i"(offsetof(__jmp_buf, sig_retaddr)),
[extra] "i"(offsetof(__jmp_buf, sig_extra)), [setjmp] "i"(setjmp),
[epilogue] "i"(sigsetjmp_epilogue)
: "x0", "x1", "x19", "x30");
}
} // namespace LIBC_NAMESPACE_DECL
```
2025-04-29 16:37:25 -04:00
..
2025-03-18 11:38:33 -07:00
2024-11-01 14:33:30 -04:00
2025-04-04 00:36:23 +08:00
2024-10-18 16:29:07 +05:30
2025-01-13 11:23:36 +05:30
2025-04-29 09:28:42 -04:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2025-03-19 13:44:41 -04:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2025-02-28 11:43:33 -05:00
2024-11-01 14:33:30 -04:00
2024-10-30 10:09:34 -07:00
2024-07-22 12:06:03 -03:00
2024-07-22 12:06:03 -03:00
2025-04-29 16:37:25 -04:00
2024-08-22 12:58:46 -05:00
2024-11-01 14:33:30 -04:00
2025-02-05 13:24:39 -08:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2025-02-07 10:43:56 -08:00
2024-11-01 14:33:30 -04:00
2025-01-16 22:32:23 -08:00
2024-11-01 14:33:30 -04:00
2024-11-12 10:38:08 -08:00
2024-11-01 14:33:30 -04:00
2025-03-18 11:38:33 -07:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2024-09-19 14:43:00 -07:00
2025-04-14 13:39:42 -07:00
2024-08-22 12:58:46 -05:00
2024-09-19 14:43:00 -07:00
2025-02-05 13:24:39 -08:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2025-02-07 10:43:56 -08:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2024-07-19 09:26:55 -05:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2024-11-01 14:33:30 -04:00
2025-02-11 14:37:15 -08:00
2025-04-04 12:53:46 -07:00
2024-11-01 14:33:30 -04:00
2024-08-08 16:36:05 +01:00
2024-08-08 16:36:05 +01:00
2024-08-08 16:36:05 +01:00
2025-03-26 10:00:32 +08:00
2024-10-01 17:28:42 -07:00
2024-09-19 22:23:51 -04:00