[libc-commits] [libc] [libc][freebsd] initialize freebsd support (PR #124459)
via libc-commits
libc-commits at lists.llvm.org
Sun Jan 26 04:28:09 PST 2025
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 8035d38daab028b8da3cf2b01090b5f0ceacd695 d401a773d7a40b8dec0845a5b146c66acad5b019 --extensions h,cpp -- libc/src/__support/OSUtil/freebsd/exit.cpp libc/src/__support/OSUtil/freebsd/io.h libc/src/__support/OSUtil/freebsd/syscall.h libc/src/__support/OSUtil/freebsd/x86_64/syscall.h libc/src/__support/OSUtil/io.h libc/src/__support/OSUtil/syscall.h libc/test/UnitTest/FPExceptMatcher.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/__support/OSUtil/freebsd/x86_64/syscall.h b/libc/src/__support/OSUtil/freebsd/x86_64/syscall.h
index 437ff7c0ec..37d07182c2 100644
--- a/libc/src/__support/OSUtil/freebsd/x86_64/syscall.h
+++ b/libc/src/__support/OSUtil/freebsd/x86_64/syscall.h
@@ -18,38 +18,30 @@ namespace LIBC_NAMESPACE_DECL {
LIBC_INLINE long syscall_impl(long __number) {
long retcode;
- LIBC_INLINE_ASM("syscall"
- : "=a"(retcode)
- : "a"(__number)
- : SYSCALL_CLOBBER_LIST);
+ LIBC_INLINE_ASM(
+ "syscall" : "=a"(retcode) : "a"(__number) : SYSCALL_CLOBBER_LIST);
return retcode;
}
LIBC_INLINE long syscall_impl(long __number, long __arg1) {
long retcode;
- LIBC_INLINE_ASM("syscall"
- : "=a"(retcode)
- : "a"(__number), "D"(__arg1)
- : SYSCALL_CLOBBER_LIST);
+ LIBC_INLINE_ASM("syscall" : "=a"(retcode) : "a"(__number),
+ "D"(__arg1) : SYSCALL_CLOBBER_LIST);
return retcode;
}
LIBC_INLINE long syscall_impl(long __number, long __arg1, long __arg2) {
long retcode;
- LIBC_INLINE_ASM("syscall"
- : "=a"(retcode)
- : "a"(__number), "D"(__arg1), "S"(__arg2)
- : SYSCALL_CLOBBER_LIST);
+ LIBC_INLINE_ASM("syscall" : "=a"(retcode) : "a"(__number), "D"(__arg1),
+ "S"(__arg2) : SYSCALL_CLOBBER_LIST);
return retcode;
}
LIBC_INLINE long syscall_impl(long __number, long __arg1, long __arg2,
long __arg3) {
long retcode;
- LIBC_INLINE_ASM("syscall"
- : "=a"(retcode)
- : "a"(__number), "D"(__arg1), "S"(__arg2), "d"(__arg3)
- : SYSCALL_CLOBBER_LIST);
+ LIBC_INLINE_ASM("syscall" : "=a"(retcode) : "a"(__number), "D"(__arg1),
+ "S"(__arg2), "d"(__arg3) : SYSCALL_CLOBBER_LIST);
return retcode;
}
@@ -57,11 +49,8 @@ LIBC_INLINE long syscall_impl(long __number, long __arg1, long __arg2,
long __arg3, long __arg4) {
long retcode;
register long r10 __asm__("r10") = __arg4;
- LIBC_INLINE_ASM("syscall"
- : "=a"(retcode)
- : "a"(__number), "D"(__arg1), "S"(__arg2), "d"(__arg3),
- "r"(r10)
- : SYSCALL_CLOBBER_LIST);
+ LIBC_INLINE_ASM("syscall" : "=a"(retcode) : "a"(__number), "D"(__arg1),
+ "S"(__arg2), "d"(__arg3), "r"(r10) : SYSCALL_CLOBBER_LIST);
return retcode;
}
@@ -70,11 +59,9 @@ LIBC_INLINE long syscall_impl(long __number, long __arg1, long __arg2,
long retcode;
register long r10 __asm__("r10") = __arg4;
register long r8 __asm__("r8") = __arg5;
- LIBC_INLINE_ASM("syscall"
- : "=a"(retcode)
- : "a"(__number), "D"(__arg1), "S"(__arg2), "d"(__arg3),
- "r"(r10), "r"(r8)
- : SYSCALL_CLOBBER_LIST);
+ LIBC_INLINE_ASM("syscall" : "=a"(retcode) : "a"(__number), "D"(__arg1),
+ "S"(__arg2), "d"(__arg3), "r"(r10),
+ "r"(r8) : SYSCALL_CLOBBER_LIST);
return retcode;
}
@@ -85,11 +72,9 @@ LIBC_INLINE long syscall_impl(long __number, long __arg1, long __arg2,
register long r10 __asm__("r10") = __arg4;
register long r8 __asm__("r8") = __arg5;
register long r9 __asm__("r9") = __arg6;
- LIBC_INLINE_ASM("syscall"
- : "=a"(retcode)
- : "a"(__number), "D"(__arg1), "S"(__arg2), "d"(__arg3),
- "r"(r10), "r"(r8), "r"(r9)
- : SYSCALL_CLOBBER_LIST);
+ LIBC_INLINE_ASM("syscall" : "=a"(retcode) : "a"(__number), "D"(__arg1),
+ "S"(__arg2), "d"(__arg3), "r"(r10), "r"(r8),
+ "r"(r9) : SYSCALL_CLOBBER_LIST);
return retcode;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/124459
More information about the libc-commits
mailing list