[libc-commits] [libc] [libc][i386] syscall support (PR #114264)

via libc-commits libc-commits at lists.llvm.org
Wed Oct 30 09:58:29 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 f405c683ba929fcd0bcaa435ca2fbe4bb221d04b 93ebdb3d34c8b9eb9ec107dd742f53188db47a04 --extensions h -- libc/src/__support/OSUtil/linux/i386/syscall.h libc/src/__support/OSUtil/linux/syscall.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/src/__support/OSUtil/linux/i386/syscall.h b/libc/src/__support/OSUtil/linux/i386/syscall.h
index ddc51c5430..441998b6db 100644
--- a/libc/src/__support/OSUtil/linux/i386/syscall.h
+++ b/libc/src/__support/OSUtil/linux/i386/syscall.h
@@ -27,31 +27,40 @@ LIBC_INLINE long syscall_impl(long num, long arg1) {
 
 LIBC_INLINE long syscall_impl(long num, long arg1, long arg2) {
   long ret;
-  LIBC_INLINE_ASM("int $128" : "=a"(ret) : "a"(num), "b"(arg1),
-                  "c"(arg2) : "memory");
+  LIBC_INLINE_ASM("int $128"
+                  : "=a"(ret)
+                  : "a"(num), "b"(arg1), "c"(arg2)
+                  : "memory");
   return ret;
 }
 
 LIBC_INLINE long syscall_impl(long num, long arg1, long arg2, long arg3) {
   long ret;
-  LIBC_INLINE_ASM("int $128" : "=a"(ret) : "a"(num), "b"(arg1), "c"(arg2),
-                  "d"(arg3) : "memory");
+  LIBC_INLINE_ASM("int $128"
+                  : "=a"(ret)
+                  : "a"(num), "b"(arg1), "c"(arg2), "d"(arg3)
+                  : "memory");
   return ret;
 }
 
 LIBC_INLINE long syscall_impl(long num, long arg1, long arg2, long arg3,
                               long arg4) {
   long ret;
-  LIBC_INLINE_ASM("int $128" : "=a"(ret) : "a"(num), "b"(arg1), "c"(arg2),
-                  "d"(arg3), "S"(arg4) : "memory");
+  LIBC_INLINE_ASM("int $128"
+                  : "=a"(ret)
+                  : "a"(num), "b"(arg1), "c"(arg2), "d"(arg3), "S"(arg4)
+                  : "memory");
   return ret;
 }
 
 LIBC_INLINE long syscall_impl(long num, long arg1, long arg2, long arg3,
                               long arg4, long arg5) {
   long ret;
-  LIBC_INLINE_ASM("int $128" : "=a"(ret) : "a"(num), "b"(arg1), "c"(arg2),
-                  "d"(arg3), "S"(arg4), "D"(arg5) : "memory");
+  LIBC_INLINE_ASM("int $128"
+                  : "=a"(ret)
+                  : "a"(num), "b"(arg1), "c"(arg2), "d"(arg3), "S"(arg4),
+                    "D"(arg5)
+                  : "memory");
   return ret;
 }
 
@@ -65,9 +74,11 @@ LIBC_INLINE long syscall_impl(long num, long arg1, long arg2, long arg3,
     int $128
     pop %%ebp
     add $4, %%esp
-  )" : "=a"(ret) : "a"(num),
-                  "b"(arg1), "c"(arg2), "d"(arg3), "S"(arg4),
-                  "D"(arg5), [arg6] "m"(arg6) : "memory");
+  )"
+                  : "=a"(ret)
+                  : "a"(num), "b"(arg1), "c"(arg2), "d"(arg3), "S"(arg4),
+                    "D"(arg5), [arg6] "m"(arg6)
+                  : "memory");
   return ret;
 }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/114264


More information about the libc-commits mailing list