[libc-commits] [libc] 5142707 - [libc] fix architecture guarding for 32bit sigsetjmp (#164923)

via libc-commits libc-commits at lists.llvm.org
Sun Oct 26 13:40:04 PDT 2025


Author: Shreeyash Pandey
Date: 2025-10-26T16:40:01-04:00
New Revision: 51427079f73df85716b1c63cf3a436a128b96188

URL: https://github.com/llvm/llvm-project/commit/51427079f73df85716b1c63cf3a436a128b96188
DIFF: https://github.com/llvm/llvm-project/commit/51427079f73df85716b1c63cf3a436a128b96188.diff

LOG: [libc] fix architecture guarding for 32bit sigsetjmp (#164923)

Fixes: https://github.com/llvm/llvm-project/issues/164653

Signed-off-by: Shreeyash Pandey <shreeyash335 at gmail.com>

Added: 
    

Modified: 
    libc/src/setjmp/x86_64/sigsetjmp.cpp

Removed: 
    


################################################################################
diff  --git a/libc/src/setjmp/x86_64/sigsetjmp.cpp b/libc/src/setjmp/x86_64/sigsetjmp.cpp
index 4c97a01822679..2bad053c166ee 100644
--- a/libc/src/setjmp/x86_64/sigsetjmp.cpp
+++ b/libc/src/setjmp/x86_64/sigsetjmp.cpp
@@ -41,7 +41,7 @@ LLVM_LIBC_FUNCTION(int, sigsetjmp, (sigjmp_buf buf)) {
       [epilogue] "X"(sigsetjmp_epilogue)
       : "eax", "ebx", "ecx");
 }
-#endif
+#else
 [[gnu::naked]]
 LLVM_LIBC_FUNCTION(int, sigsetjmp, (sigjmp_buf, int)) {
   asm(R"(
@@ -64,5 +64,6 @@ LLVM_LIBC_FUNCTION(int, sigsetjmp, (sigjmp_buf, int)) {
       [epilogue] "X"(sigsetjmp_epilogue)
       : "rax", "rbx");
 }
+#endif
 
 } // namespace LIBC_NAMESPACE_DECL


        


More information about the libc-commits mailing list