[libc-commits] [libc] [libc][setjmp] make x86_64 longjmp naked (PR #112581)
via libc-commits
libc-commits at lists.llvm.org
Wed Oct 16 10:04:37 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 46200fcf941d16bc8a494a3915e1178502e37a3e 6ca41d94bed4c2f78495bbf40d602fd8c5ea7566 --extensions h,cpp -- libc/src/setjmp/longjmp.h libc/src/setjmp/x86_64/longjmp.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/setjmp/x86_64/longjmp.cpp b/libc/src/setjmp/x86_64/longjmp.cpp
index 5d5da67334..c293c55a6f 100644
--- a/libc/src/setjmp/x86_64/longjmp.cpp
+++ b/libc/src/setjmp/x86_64/longjmp.cpp
@@ -32,16 +32,11 @@ LLVM_LIBC_FUNCTION(void, longjmp, (jmp_buf, int)) {
movq %c[r15](%%rdi), %%r15
movq %c[rsp](%%rdi), %%rsp
jmpq *%c[rip](%%rdi)
- )" ::
- [rbx] "i"(offsetof(__jmp_buf, rbx)),
- [rbp] "i"(offsetof(__jmp_buf, rbp)),
- [r12] "i"(offsetof(__jmp_buf, r12)),
- [r13] "i"(offsetof(__jmp_buf, r13)),
- [r14] "i"(offsetof(__jmp_buf, r14)),
- [r15] "i"(offsetof(__jmp_buf, r15)),
- [rsp] "i"(offsetof(__jmp_buf, rsp)),
- [rip] "i"(offsetof(__jmp_buf, rip))
-);
+ )" ::[rbx] "i"(offsetof(__jmp_buf, rbx)),
+ [rbp] "i"(offsetof(__jmp_buf, rbp)), [r12] "i"(offsetof(__jmp_buf, r12)),
+ [r13] "i"(offsetof(__jmp_buf, r13)), [r14] "i"(offsetof(__jmp_buf, r14)),
+ [r15] "i"(offsetof(__jmp_buf, r15)), [rsp] "i"(offsetof(__jmp_buf, rsp)),
+ [rip] "i"(offsetof(__jmp_buf, rip)));
}
} // namespace LIBC_NAMESPACE_DECL
``````````
</details>
https://github.com/llvm/llvm-project/pull/112581
More information about the libc-commits
mailing list