[libc-commits] [libc] draft: libc support for hexagon linux (PR #81815)
via libc-commits
libc-commits at lists.llvm.org
Wed Feb 14 18:14:27 PST 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 a0a41d106dc932fa39c40562fc0d6f05fb8f5119 1343ea126775d77ad97223b2b86aae0dab6c8ac8 -- libc/src/__support/OSUtil/linux/hexagon/syscall.h libc/src/setjmp/hexagon/longjmp.cpp libc/src/setjmp/hexagon/setjmp.cpp libc/startup/linux/hexagon/start.cpp libc/config/linux/app.h libc/include/llvm-libc-macros/linux/signal-macros.h libc/include/llvm-libc-types/fenv_t.h libc/include/llvm-libc-types/jmp_buf.h libc/include/llvm-libc-types/wint_t.h libc/src/__support/OSUtil/linux/syscall.h libc/src/__support/RPC/rpc_util.h libc/src/__support/integer_utils.h libc/src/__support/macros/properties/architectures.h libc/src/__support/macros/properties/float.h libc/src/__support/threads/linux/thread.cpp libc/src/__support/threads/thread.h libc/src/string/memory_utils/inline_bcmp.h libc/src/string/memory_utils/inline_memcmp.h libc/src/string/memory_utils/inline_memcpy.h libc/src/string/memory_utils/inline_memmove.h libc/src/string/memory_utils/inline_memset.h libc/test/UnitTest/LibcDeathTestExecutors.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/__support/macros/properties/float.h b/libc/src/__support/macros/properties/float.h
index 8585dcdefaa..99553f7e80a 100644
--- a/libc/src/__support/macros/properties/float.h
+++ b/libc/src/__support/macros/properties/float.h
@@ -23,7 +23,8 @@
(defined(LIBC_TARGET_OS_IS_MACOS) && \
defined(LIBC_TARGET_ARCH_IS_AARCH64)) || \
defined(LIBC_TARGET_ARCH_IS_ARM) || defined(LIBC_TARGET_ARCH_IS_NVPTX) || \
- defined(LIBC_TARGET_ARCH_IS_AMDGPU) || defined(LIBC_TARGET_ARCH_IS_HEXAGON)
+ defined(LIBC_TARGET_ARCH_IS_AMDGPU) || \
+ defined(LIBC_TARGET_ARCH_IS_HEXAGON)
#define LONG_DOUBLE_IS_DOUBLE
#endif
diff --git a/libc/src/setjmp/hexagon/longjmp.cpp b/libc/src/setjmp/hexagon/longjmp.cpp
index ee334553155..a30d5dc865b 100644
--- a/libc/src/setjmp/hexagon/longjmp.cpp
+++ b/libc/src/setjmp/hexagon/longjmp.cpp
@@ -21,14 +21,14 @@
namespace LIBC_NAMESPACE {
LLVM_LIBC_FUNCTION(void, longjmp, (__jmp_buf * buf, int val)) {
- LOAD(r17:16, buf->__regs[0]);
- LOAD(r19:18, buf->__regs[2]);
- LOAD(r21:20, buf->__regs[4]);
- LOAD(r23:22, buf->__regs[6]);
- LOAD(r25:24, buf->__regs[8]);
- LOAD(r27:26, buf->__regs[10]);
- LOAD(r29:28, buf->__regs[12]);
- LOAD(r31:30, buf->__regs[14]);
+ LOAD(r17 : 16, buf->__regs[0]);
+ LOAD(r19 : 18, buf->__regs[2]);
+ LOAD(r21 : 20, buf->__regs[4]);
+ LOAD(r23 : 22, buf->__regs[6]);
+ LOAD(r25 : 24, buf->__regs[8]);
+ LOAD(r27 : 26, buf->__regs[10]);
+ LOAD(r29 : 28, buf->__regs[12]);
+ LOAD(r31 : 30, buf->__regs[14]);
val = val == 0 ? 1 : val;
LIBC_INLINE_ASM("r0 = %0\n\t" : : "r"(val) :);
diff --git a/libc/src/setjmp/hexagon/setjmp.cpp b/libc/src/setjmp/hexagon/setjmp.cpp
index 5c936f29f7e..3dfb7e76b74 100644
--- a/libc/src/setjmp/hexagon/setjmp.cpp
+++ b/libc/src/setjmp/hexagon/setjmp.cpp
@@ -21,14 +21,14 @@
namespace LIBC_NAMESPACE {
LLVM_LIBC_FUNCTION(int, setjmp, (__jmp_buf * buf)) {
- STORE(r17:16, buf->__regs[0]);
- STORE(r19:18, buf->__regs[2]);
- STORE(r21:20, buf->__regs[4]);
- STORE(r23:22, buf->__regs[6]);
- STORE(r25:24, buf->__regs[8]);
- STORE(r27:26, buf->__regs[10]);
- STORE(r29:28, buf->__regs[12]);
- STORE(r31:30, buf->__regs[14]);
+ STORE(r17 : 16, buf->__regs[0]);
+ STORE(r19 : 18, buf->__regs[2]);
+ STORE(r21 : 20, buf->__regs[4]);
+ STORE(r23 : 22, buf->__regs[6]);
+ STORE(r25 : 24, buf->__regs[8]);
+ STORE(r27 : 26, buf->__regs[10]);
+ STORE(r29 : 28, buf->__regs[12]);
+ STORE(r31 : 30, buf->__regs[14]);
return 0;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/81815
More information about the libc-commits
mailing list