This set of patches is a request for comments (RFC) on the support to
add 16-bit floating point support to the GCC 16 PowerPC. In GCC 16, I
anticipate this will be listed as an experimental feature, to allow
the code to be refined by the time GCC 17 ships.
There are 2 popular 16-bit floating point formats.
_Float16 (HFmode):
==================
This is the IEEE 754-2008 16-bit floating point. It has 1 sign bit, 5
exponent bits, 10 explicit mantassia bits (the 11th bit is implied with
normalization).
The PowerPC ISA 3.0 (power9) has instructions to convert between the
scalar representations of _Float16 and float types. The PowerPC ISA
3.1 (power10 and power11) has instructions for converting between the
even elements of _Float16 vectors and float vectors. In addition, the
MMA subsystem has support for _Float16 vector processing.
__bfloat16 (BFmode):
====================
This is the brain 16-bit floating point created by the Google Brain
project. It has 1 sign bit, 8 exponent bits, 7 explicit mantissa bits
(the 8th bit is implied with normalization). The 16 bits in the
__bfloat16 format is the same as the upper 16 bits in the normal IEEE
754 32-bit floating point format.
he PowerPC ISA 3.1 (power10 and power11) has instructions for
converting between the even elements of _bfloat16 vectors and float
vectors. In addition, the MMA subsystem has support for _bfloat16
vector processing.
There are 9 patches in this patch set.
1: Add internal modes for supporting 16-bit floating point
2: Add initial 16-bit floating point
3: Add libgcc support
4: Add power9 support for _Float16 conversions
5: Add power10 support for __bfloat16 conversions
6: Add other scalar 16-bit floating point conversions
7: Add 16-bit floating point NEG, ABS, NABS support
8: Add 16-bit floating point vectorization
9: Add documentation for -mfloat16
I have more that I need to do, such as adding tests, beefing up the
ChangeLog comments, etc.
But I figured to post the patches that I have now as a RFC so I can
change things before the official submission.
--
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: [email protected]