IEEE Interchange floating point and extended floating point for C++
Joseph Myers
joseph@codesourcery.com
Fri Mar 12 17:49:30 GMT 2021
On Fri, 12 Mar 2021, Jonathan Wakely wrote:
> On Fri, 12 Mar 2021 at 12:26, Sjoerd Meijer via Gcc <gcc@gcc.gnu.org> wrote:
> > So here's finally my concrete question: what do we think about making _Float16 available in C++ mode?
>
> I think GCC should do it.
What about types with the same format as an existing type (but which are
nevertheless distinct types in C), such as _Float64 (typically same format
as double) or _Float32 (typically same format as float, but not promoted
when passed in variable arguments)?
When those types escape into C++ code, they cause an ICE in name mangling;
see bug 85518.
(Incidental note on _Float16: various architectures have some hardware
support for that format that don't have support for the type in GCC,
although they may well have GCC built-in functions corresponding to the
hardware support; also library support in glibc hasn't yet been
implemented. In the case of x86_64 (F16C hardware conversion instructions
from Ivy Bridge onwards), the psABI document defines an ABI for _Float16
and the corresponding complex type; in general such an ABI should be
agreed with interested parties when adding _Float16 support for an
architecture.)
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc
mailing list