The -mlong-double-64 and -mlong-double-128 command line options aren't documented. The -Q --help=target output shows -mlong-double-[64,128] 127 which is a bit confusing (it only allows setting it to 64 and 128; 127 and 129 have an internal meaning, but the user shouldn't see it, ideally).
I see a documentation: $ powerpc64le-suse-linux-gcc --help=target | grep long-do -mlong-double-[64,128] Specify size of long double.
That isn't documentation.
I have looked at what -mlong-double-64 and -mlong-double-128 do. The -mlong-double-64 tells GCC to use the 64-bit IEEE floating point format. The -mlong-double-128 tells GCC to use 128-bit floating point format. On ppc64, there are actually two 128-bit floating point formats that are supported. So it looks to me like the user should also specify either -mabi=ieeelongdouble to get the 128-bit IEEE floating point format or -mabi=ibmlongdouble to get the IBM 128-bit floating point format. I created a patch that updates the output of the gcc --target-help command to print the following: -mlong-double- Use -mlong-double-64 for 64-bit IEEE floating point format. Use -mlong-double-128 and -mabi=ieeelongdouble for 128-bit IEEE floating point format. Use -mlong-double-128 and -mabi=ibmlongdouble for 128-bit IBM floating point format. Please let me know if this description is accurate and better. Suggestions on improvements are always welcome.
Created attachment 47982 [details] patch to update -mlong-double-NN description Attached the proposed patch so I will not lose it.
Yeah, not sure. A user can just do `-mlong-double-128`, and will get whichever 128-bit format is the default. That is the "old" way, when we only had the ibm128 format, and it will be the new way too, when ibm128 has become a bad dream and everything uses ieee128. Maybe just something like Use -mlong-double-128 for an 128-bit floating point format (either IEEE or IBM)?
Yea, I like that a bit better. It is a bit shorter, mine was a bit verbose. I updated the patch to print: -mlong-double- Use -mlong-double-64 for 64-bit IEEE floating point format. Use -mlong-double-128 for 128-bit floating point format (either IEEE or IBM). I will post the patch to the mailing list for review/acceptance on mainline.
Patch approved by Segher with a few minor fixes to the patch. Patch committed to mainline commit 9439378f7a08cf9c8f524c9f3758a37d804ac106 Author: Carl Love <cel@us.ibm.com> Date: Thu Mar 5 12:52:35 2020 -0600 rs6000: Fix -mlong-double documentation gcc/ChangeLog 2020-03-09 Carl Love <cel@us.ibm.com> * config/rs6000/rs6000.opt: Update the description of the command line option.
Work is complete.