https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120897
Bug ID: 120897
Summary: __aeabi_d2h/__aeabi_d2h_alt function not implemented
in libgcc
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Target: arm*-*-*eabi
GCC defines its own set of functions for conversions between half float and
float/double:
set_conv_libfunc (trunc_optab, HFmode, SFmode,
(arm_fp16_format == ARM_FP16_FORMAT_IEEE
? "__gnu_f2h_ieee"
: "__gnu_f2h_alternative"));
set_conv_libfunc (sext_optab, SFmode, HFmode,
(arm_fp16_format == ARM_FP16_FORMAT_IEEE
? "__gnu_h2f_ieee"
: "__gnu_h2f_alternative"));
set_conv_libfunc (trunc_optab, HFmode, DFmode,
(arm_fp16_format == ARM_FP16_FORMAT_IEEE
? "__gnu_d2h_ieee"
: "__gnu_d2h_alternative"));
The
https://github.com/ARM-software/abi-aa/blob/c51addc3dc03e73a016a1e4edf25440bcac76431/rtabi32/rtabi32.rst#standard-conversions-between-floating-types
Specifies the following functions:
__aeabi_f2h/__aeabi_f2h_alt
__aeabi_h2f/__aeabi_h2f_alt
__aeabi_d2h/__aeabi_d2h_alt
libgcc does not have an implemention for these though.
This not implementation of these causes problems when compiling some code with
LLVM and then linking with GCC. Since LLVM uses the ABI specified names while
GCC has its own.
A patch was posted to fix part of this but it looks like it never went in:
https://gcc.gnu.org/legacy-ml/gcc-patches/2012-07/msg00902.html
See https://reviews.llvm.org/D94557 also.