This patch adds the documentation. I have built the compiler with this patch and the previous subpatches (1-14). I have bootstrapped the compiler with all 16 subpatches installed, and there were no regressions. Is it ok to install in the trunk?
2015-10-22 Michael Meissner <meiss...@linux.vnet.ibm.com> * doc/extend.texi (Floating Types): Document __ibm128 and __float128 on PowerPC. * doc/invoke.texi (RS/6000 and PowerPC Options): Document -mfloat128 and -mno-float128. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meiss...@linux.vnet.ibm.com, phone: +1 (978) 899-4797
Index: gcc/doc/extend.texi =================================================================== --- gcc/doc/extend.texi (revision 229182) +++ gcc/doc/extend.texi (working copy) @@ -929,6 +929,7 @@ examine and set these two fictitious var @cindex additional floating types @cindex @code{__float80} data type @cindex @code{__float128} data type +@cindex @code{__ibm128} data type @cindex @code{w} floating point suffix @cindex @code{q} floating point suffix @cindex @code{W} floating point suffix @@ -941,19 +942,39 @@ Support for additional types includes th add, subtract, multiply, divide; unary arithmetic operators; relational operators; equality operators; and conversions to and from integer and other floating types. Use a suffix @samp{w} or @samp{W} -in a literal constant of type @code{__float80} and @samp{q} or @samp{Q} -for @code{_float128}. You can declare complex types using the -corresponding internal complex type, @code{XCmode} for @code{__float80} -type and @code{TCmode} for @code{__float128} type: +in a literal constant of type @code{__float80} or type +@code{__ibm128}. Use a suffix @samp{q} or @samp{Q} for @code{_float128}. + +On the i386, x86_64, IA-64, and HP-UX targets, you can declare complex +types using the corresponding internal complex type, @code{XCmode} for +@code{__float80} type and @code{TCmode} for @code{__float128} type: @smallexample typedef _Complex float __attribute__((mode(TC))) _Complex128; typedef _Complex float __attribute__((mode(XC))) _Complex80; @end smallexample +On PowerPC Linux, Freebsd and Darwin systems, the default for +@code{long double} is to use the IBM extended floating point format +that uses a pair of @code{double} values to extend the precision. +This means that the mode @code{TCmode} was already used by the +traditional IBM long double format, and you would need to use the mode +@code{KCmode}: + +@smallexample +typedef _Complex float __attribute__((mode(KC))) _Complex128; +@end smallexample + Not all targets support additional floating-point types. @code{__float80} and @code{__float128} types are supported on x86 and IA-64 targets. -The @code{__float128} type is supported on hppa HP-UX targets. +The @code{__float128} type is supported on hppa HP-UX. +The @code{__float128} type is supported on PowerPC systems by default +if the vector scalar instruction set (VSX) is enabled. + +On the PowerPC, @code{__ibm128} provides access to the IBM extended +double format, and it is intended to be used by the library functions +that handle conversions if/when long double is changed to be IEEE +128-bit floating point. @node Half-Precision @section Half-Precision Floating Point Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 229182) +++ gcc/doc/invoke.texi (working copy) @@ -946,7 +946,8 @@ See RS/6000 and PowerPC Options. -mquad-memory-atomic -mno-quad-memory-atomic @gol -mcompat-align-parm -mno-compat-align-parm @gol -mupper-regs-df -mno-upper-regs-df -mupper-regs-sf -mno-upper-regs-sf @gol --mupper-regs -mno-upper-regs} +-mupper-regs -mno-upper-regs @gol +-mfloat128 -mno-float128} @emph{RX Options} @gccoptlist{-m64bit-doubles -m32bit-doubles -fpu -nofpu@gol @@ -19519,6 +19520,17 @@ floating point register set, depending o If the @option{-mno-upper-regs} option is used, it turns off both @option{-mupper-regs-sf} and @option{-mupper-regs-df} options. +@item -mfloat128 +@itemx -mno-float128 +@opindex mfloat128 +@opindex mno-float128 +Enable/disable the @var{__float128} keyword for IEEE 128-bit floating point +and use software emulation for IEEE 128-bit floating point. + +The VSX instruction set (@option{-mvsx}, @option{-mcpu=power7}, or +@option{-mcpu=power8}) must be enabled to use the @option{-mfloat128} +option. + @item -mfloat-gprs=@var{yes/single/double/no} @itemx -mfloat-gprs @opindex mfloat-gprs