[libc-commits] [libc] Revert "[libc][RISCV] Add naked attribute to setjmp/longjmp" (PR #100193)

via libc-commits libc-commits at lists.llvm.org
Tue Jul 23 13:17:29 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Paul Kirth (ilovepi)

<details>
<summary>Changes</summary>

Reverts llvm/llvm-project#<!-- -->100036

This caused a failure on bots:    https://lab.llvm.org/buildbot/#/builders/183/builds/1799

We likely need to discuss the particulars here a bit more deeply before either relanding or choosing an alternate solution

---
Full diff: https://github.com/llvm/llvm-project/pull/100193.diff


2 Files Affected:

- (modified) libc/src/setjmp/riscv/longjmp.cpp (-1) 
- (modified) libc/src/setjmp/riscv/setjmp.cpp (-1) 


``````````diff
diff --git a/libc/src/setjmp/riscv/longjmp.cpp b/libc/src/setjmp/riscv/longjmp.cpp
index b14f636659ac3..0f9537ccc4151 100644
--- a/libc/src/setjmp/riscv/longjmp.cpp
+++ b/libc/src/setjmp/riscv/longjmp.cpp
@@ -30,7 +30,6 @@
 
 namespace LIBC_NAMESPACE_DECL {
 
-[[gnu::naked]]
 LLVM_LIBC_FUNCTION(void, longjmp, (__jmp_buf * buf, int val)) {
   LOAD(ra, buf->__pc);
   LOAD(s0, buf->__regs[0]);
diff --git a/libc/src/setjmp/riscv/setjmp.cpp b/libc/src/setjmp/riscv/setjmp.cpp
index 92982cc9d74d4..12def578b56f3 100644
--- a/libc/src/setjmp/riscv/setjmp.cpp
+++ b/libc/src/setjmp/riscv/setjmp.cpp
@@ -29,7 +29,6 @@
 
 namespace LIBC_NAMESPACE_DECL {
 
-[[gnu::naked]]
 LLVM_LIBC_FUNCTION(int, setjmp, (__jmp_buf * buf)) {
   STORE(ra, buf->__pc);
   STORE(s0, buf->__regs[0]);

``````````

</details>


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


More information about the libc-commits mailing list