Skip to content

Conversation

@bojle
Copy link
Contributor

@bojle bojle commented Oct 24, 2025

Fixes: #164653

Signed-off-by: Shreeyash Pandey <shreeyash335@gmail.com>
@llvmbot llvmbot added the libc label Oct 24, 2025
@bojle
Copy link
Contributor Author

bojle commented Oct 24, 2025

@michaelrj-google

@llvmbot
Copy link
Member

llvmbot commented Oct 24, 2025

@llvm/pr-subscribers-libc

Author: Shreeyash Pandey (bojle)

Changes

Fixes: #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 --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

@SchrodingerZhu SchrodingerZhu self-requested a review October 24, 2025 13:27
Copy link
Contributor

@SchrodingerZhu SchrodingerZhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for fixing this!

@bojle
Copy link
Contributor Author

bojle commented Oct 26, 2025

can you merge this? @SchrodingerZhu

@SchrodingerZhu SchrodingerZhu merged commit 5142707 into llvm:main Oct 26, 2025
22 checks passed
varun-r-mallya pushed a commit to varun-r-mallya/llvm-project that referenced this pull request Oct 27, 2025
Fixes: llvm#164653

Signed-off-by: Shreeyash Pandey <shreeyash335@gmail.com>
dvbuka pushed a commit to dvbuka/llvm-project that referenced this pull request Oct 27, 2025
Fixes: llvm#164653

Signed-off-by: Shreeyash Pandey <shreeyash335@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[libc] Incorrect architecture guarding macros in x86 sigsetjmp.cpp

3 participants