[libc-commits] [libc] [libc] fix architecture guarding for 32bit sigsetjmp (PR #164923)
via libc-commits
libc-commits at lists.llvm.org
Thu Oct 23 20:47:48 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Shreeyash Pandey (bojle)
<details>
<summary>Changes</summary>
Fixes: https://github.com/llvm/llvm-project/issues/164653
---
Full diff: https://github.com/llvm/llvm-project/pull/164923.diff
1 Files Affected:
- (modified) libc/src/setjmp/x86_64/sigsetjmp.cpp (+2-1)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/164923
More information about the libc-commits
mailing list