[compiler-rt] ce2a498 - [compiler-rt] Restrict __gnu_h2f_ieee and __gnu_f2h_ieee to arm32 EABI (#220170)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 11 16:23:30 PDT 2026
Author: Trevor Gross
Date: 2026-10-11T16:23:25-07:00
New Revision: ce2a4984a3f43327a2b7c40baa74907bc10eb899
URL: https://github.com/llvm/llvm-project/commit/ce2a4984a3f43327a2b7c40baa74907bc10eb899
DIFF: https://github.com/llvm/llvm-project/commit/ce2a4984a3f43327a2b7c40baa74907bc10eb899.diff
LOG: [compiler-rt] Restrict __gnu_h2f_ieee and __gnu_f2h_ieee to arm32 EABI (#220170)
Added:
Modified:
compiler-rt/lib/builtins/extendhfsf2.c
compiler-rt/lib/builtins/truncsfhf2.c
Removed:
################################################################################
diff --git a/compiler-rt/lib/builtins/extendhfsf2.c b/compiler-rt/lib/builtins/extendhfsf2.c
index 376ca040f1b92..528bac3325443 100644
--- a/compiler-rt/lib/builtins/extendhfsf2.c
+++ b/compiler-rt/lib/builtins/extendhfsf2.c
@@ -16,13 +16,13 @@ COMPILER_RT_ABI NOINLINE float __extendhfsf2(src_t a) {
return __extendXfYf2__(a);
}
+#if defined(__ARM_EABI__)
// arm32-gnueabi-only routine that uses integers in the signature. This should
// be gnueabi-specific, but LLVM currently emits it on more eabi platforms.
COMPILER_RT_ABI uint32_t __gnu_h2f_ieee(uint16_t a) {
return dstToRep(__extendhfsf2(srcFromRep(a)));
}
-#if defined(__ARM_EABI__)
#if defined(COMPILER_RT_ARMHF_TARGET)
AEABI_RTABI float __aeabi_h2f(src_t a) { return __extendhfsf2(a); }
#else
diff --git a/compiler-rt/lib/builtins/truncsfhf2.c b/compiler-rt/lib/builtins/truncsfhf2.c
index 095fd504d2044..fd59604a1018a 100644
--- a/compiler-rt/lib/builtins/truncsfhf2.c
+++ b/compiler-rt/lib/builtins/truncsfhf2.c
@@ -16,13 +16,13 @@ COMPILER_RT_ABI NOINLINE dst_t __truncsfhf2(float a) {
return __truncXfYf2__(a);
}
+#if defined(__ARM_EABI__)
// arm32-gnueabi-only routine that uses integers in the signature. This should
// be gnueabi-specific, but LLVM currently emits it on more eabi platforms.
COMPILER_RT_ABI uint16_t __gnu_f2h_ieee(uint32_t a) {
return dstToRep(__truncsfhf2(srcFromRep(a)));
}
-#if defined(__ARM_EABI__)
#if defined(COMPILER_RT_ARMHF_TARGET)
AEABI_RTABI dst_t __aeabi_f2h(float a) { return __truncsfhf2(a); }
#else
More information about the llvm-commits
mailing list