[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
- [PATCH 1/8] riscv64: Support riscv_align relocations, Vladimir Serbinenko, 2024/09/11
- [PATCH 2/8] compiler-rt: Add __multi3, Vladimir Serbinenko, 2024/09/11
- [PATCH 5/8] efi/linux: Silence warning, Vladimir Serbinenko, 2024/09/11
- [PATCH 3/8] Support clang integrated-as sparc64, Vladimir Serbinenko, 2024/09/11
- [PATCH 4/8] powerpc-ieee1275: Fix warnings and alignment, Vladimir Serbinenko, 2024/09/11
- [PATCH 6/8] btrfs: Add an explicit GRUB_PACKED, Vladimir Serbinenko, 2024/09/11
- [PATCH 8/8] configure: Try -msoft-float -mfloat-abi=soft on arm, Vladimir Serbinenko, 2024/09/11
- [PATCH 7/8] Enable __clzsi2/__clzdi2 on arm,
Vladimir Serbinenko <=