-
Michael Meissner authored
In the patch that I applied on March 2nd, I had code to provide support for Decimal/_Float128 conversions if the user did not use at least GLIBC 2.32. It did this by using __ibm128 as an intermediate type. The trouble is __ibm128 cannot represent all of the numbers that _Float128 can, and you lose if you do this conversion. This patch removes this support. The dfp-bit.c functions now call the the __sprintfieee128 and __strtoieee128 functions to do the conversion. If the user does not have GLIBC, they will get a linker error that these functions do not exist. The float128 support functions are only built into the static libgcc, so there isn't an issue with having references to __strtoieee128 and __sprintfieee128 with older GLIBC libraries. As an added bonus, this patch eliminates the __sprintfkf function which included stdio.h to get a definition for the sprintf library function. This allows for building cross compilers without having to have a target stdio.h available. libgcc/ 2021-03-29 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/t-float128 (fp128_decstr_funcs): Delete. (fp128_ppc_funcs): Do not add $(fp128_decstr_funcs). (fp128_decstr_objs): Delete. * dfp-bit.h: Call __sprintfieee128 to do conversions from _Float128 to a Decimal type. Call __strtoieee128 to do conversions from a Decimal type to _Float128. * config/rs6000/_sprintfkf.c: Delete file. * config/rs6000/_sprintfkf.h: Delete file. * config/rs6000/_strtokf.c: Delete file. * config/rs6000/_strtokf.h: Delete file.
Michael Meissner authoredIn the patch that I applied on March 2nd, I had code to provide support for Decimal/_Float128 conversions if the user did not use at least GLIBC 2.32. It did this by using __ibm128 as an intermediate type. The trouble is __ibm128 cannot represent all of the numbers that _Float128 can, and you lose if you do this conversion. This patch removes this support. The dfp-bit.c functions now call the the __sprintfieee128 and __strtoieee128 functions to do the conversion. If the user does not have GLIBC, they will get a linker error that these functions do not exist. The float128 support functions are only built into the static libgcc, so there isn't an issue with having references to __strtoieee128 and __sprintfieee128 with older GLIBC libraries. As an added bonus, this patch eliminates the __sprintfkf function which included stdio.h to get a definition for the sprintf library function. This allows for building cross compilers without having to have a target stdio.h available. libgcc/ 2021-03-29 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/t-float128 (fp128_decstr_funcs): Delete. (fp128_ppc_funcs): Do not add $(fp128_decstr_funcs). (fp128_decstr_objs): Delete. * dfp-bit.h: Call __sprintfieee128 to do conversions from _Float128 to a Decimal type. Call __strtoieee128 to do conversions from a Decimal type to _Float128. * config/rs6000/_sprintfkf.c: Delete file. * config/rs6000/_sprintfkf.h: Delete file. * config/rs6000/_strtokf.c: Delete file. * config/rs6000/_strtokf.h: Delete file.