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

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


Author: Paul Kirth
Date: 2024-07-23T13:17:12-07:00
New Revision: 8bdc3d9ebb19e8c455c77241ef52ea74be6acfed

URL: https://github.com/llvm/llvm-project/commit/8bdc3d9ebb19e8c455c77241ef52ea74be6acfed
DIFF: https://github.com/llvm/llvm-project/commit/8bdc3d9ebb19e8c455c77241ef52ea74be6acfed.diff

LOG: Revert "[libc][RISCV] Add naked attribute to setjmp/longjmp" (#100193)

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.

Added: 
    

Modified: 
    libc/src/setjmp/riscv/longjmp.cpp
    libc/src/setjmp/riscv/setjmp.cpp

Removed: 
    


################################################################################
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]);


        


More information about the libc-commits mailing list