grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 7/8] Enable __clzsi2/__clzdi2 on arm


From: Vladimir Serbinenko
Subject: [PATCH 7/8] Enable __clzsi2/__clzdi2 on arm
Date: Wed, 11 Sep 2024 12:41:24 +0300

It's emitted by clang
---
 grub-core/kern/compiler-rt.c | 4 +---
 include/grub/compiler-rt.h   | 5 +----
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/grub-core/kern/compiler-rt.c b/grub-core/kern/compiler-rt.c
index 2902ed03d..17ae435c1 100644
--- a/grub-core/kern/compiler-rt.c
+++ b/grub-core/kern/compiler-rt.c
@@ -410,7 +410,7 @@ __aeabi_llsl (grub_uint64_t u, int b)
 
 #endif
 
-#if defined(__mips__) || defined(__riscv) || defined(__sparc__)
+#if defined(__mips__) || defined(__riscv) || defined(__sparc__) || 
defined(__arm__)
 /* Based on libgcc from gcc suite. */
 int
 __clzsi2 (grub_uint32_t val)
@@ -436,9 +436,7 @@ __clzsi2 (grub_uint32_t val)
     }
   return (i - val);
 }
-#endif
 
-#if defined(__mips__) || defined(__riscv) || defined(__sparc__)
 int
 __clzdi2 (grub_uint64_t val)
 {
diff --git a/include/grub/compiler-rt.h b/include/grub/compiler-rt.h
index 3637db47e..26016088e 100644
--- a/include/grub/compiler-rt.h
+++ b/include/grub/compiler-rt.h
@@ -110,12 +110,9 @@ EXPORT_FUNC (__aeabi_llsr) (grub_uint64_t u, int b);
 
 #endif
 
-#if defined(__mips__) || defined(__riscv) || defined(__sparc__)
+#if defined(__mips__) || defined(__riscv) || defined(__sparc__) || 
defined(__arm__)
 int
 EXPORT_FUNC (__clzsi2) (grub_uint32_t val);
-#endif
-
-#if defined(__mips__) || defined(__riscv) || defined(__sparc__)
 int
 EXPORT_FUNC (__clzdi2) (grub_uint64_t val);
 #endif
-- 
2.39.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]