2018-06-20 21:35:35 +00:00
|
|
|
%include <ldbl-128ibm-compat-abi.h>
|
|
|
|
%ifndef LDBL_IBM128_VERSION
|
|
|
|
% error "ldbl-128ibm-compat-abi.h must define LDBL_IBM128_VERSION"
|
|
|
|
%endif
|
|
|
|
|
|
|
|
libm {
|
|
|
|
LDBL_IBM128_VERSION {
|
|
|
|
__acoshieee128;
|
|
|
|
__acosieee128;
|
|
|
|
__asinhieee128;
|
|
|
|
__asinieee128;
|
|
|
|
__atan2ieee128;
|
|
|
|
__atanhieee128;
|
|
|
|
__atanieee128;
|
|
|
|
__cabsieee128;
|
|
|
|
__cacoshieee128;
|
|
|
|
__cacosieee128;
|
|
|
|
__canonicalizeieee128;
|
|
|
|
__cargieee128;
|
|
|
|
__casinhieee128;
|
|
|
|
__casinieee128;
|
|
|
|
__catanhieee128;
|
|
|
|
__catanieee128;
|
|
|
|
__cbrtieee128;
|
|
|
|
__ccoshieee128;
|
|
|
|
__ccosieee128;
|
|
|
|
__ceilieee128;
|
|
|
|
__cexpieee128;
|
|
|
|
__cimagieee128;
|
|
|
|
__clog10ieee128;
|
|
|
|
__clogieee128;
|
|
|
|
__conjieee128;
|
|
|
|
__copysignieee128;
|
|
|
|
__coshieee128;
|
|
|
|
__cosieee128;
|
|
|
|
__cpowieee128;
|
|
|
|
__cprojieee128;
|
|
|
|
__crealieee128;
|
|
|
|
__csinhieee128;
|
|
|
|
__csinieee128;
|
|
|
|
__csqrtieee128;
|
|
|
|
__ctanhieee128;
|
|
|
|
__ctanieee128;
|
|
|
|
__erfcieee128;
|
|
|
|
__erfieee128;
|
|
|
|
__exp10ieee128;
|
|
|
|
__exp2ieee128;
|
|
|
|
__expieee128;
|
|
|
|
__expm1ieee128;
|
|
|
|
__fabsieee128;
|
|
|
|
__fdimieee128;
|
|
|
|
__floorieee128;
|
|
|
|
__fmaieee128;
|
|
|
|
__fmaxieee128;
|
|
|
|
__fmaxmagieee128;
|
|
|
|
__fminieee128;
|
|
|
|
__fminmagieee128;
|
|
|
|
__fmodieee128;
|
|
|
|
__frexpieee128;
|
|
|
|
__fromfpieee128;
|
|
|
|
__fromfpxieee128;
|
|
|
|
__getpayloadieee128;
|
|
|
|
__hypotieee128;
|
|
|
|
__ilogbieee128;
|
|
|
|
__j0ieee128;
|
|
|
|
__j1ieee128;
|
|
|
|
__jnieee128;
|
|
|
|
__ldexpieee128;
|
|
|
|
__lgammaieee128;
|
|
|
|
__lgammaieee128_r;
|
|
|
|
__llogbieee128;
|
|
|
|
__llrintieee128;
|
|
|
|
__llroundieee128;
|
|
|
|
__log10ieee128;
|
|
|
|
__log1pieee128;
|
|
|
|
__log2ieee128;
|
|
|
|
__logbieee128;
|
|
|
|
__logieee128;
|
|
|
|
__lrintieee128;
|
|
|
|
__lroundieee128;
|
|
|
|
__modfieee128;
|
|
|
|
__nanieee128;
|
|
|
|
__nearbyintieee128;
|
|
|
|
__nextafterieee128;
|
|
|
|
__nextdownieee128;
|
|
|
|
__nextupieee128;
|
|
|
|
__powieee128;
|
|
|
|
__remainderieee128;
|
|
|
|
__remquoieee128;
|
|
|
|
__rintieee128;
|
|
|
|
__roundevenieee128;
|
|
|
|
__roundieee128;
|
|
|
|
__scalblnieee128;
|
|
|
|
__scalbnieee128;
|
|
|
|
__setpayloadieee128;
|
|
|
|
__setpayloadsigieee128;
|
|
|
|
__sincosieee128;
|
|
|
|
__sinhieee128;
|
|
|
|
__sinieee128;
|
|
|
|
__sqrtieee128;
|
|
|
|
__tanhieee128;
|
|
|
|
__tanieee128;
|
|
|
|
__tgammaieee128;
|
|
|
|
__totalorderieee128;
|
|
|
|
__totalordermagieee128;
|
|
|
|
__truncieee128;
|
|
|
|
__ufromfpieee128;
|
|
|
|
__ufromfpxieee128;
|
|
|
|
__y0ieee128;
|
|
|
|
__y1ieee128;
|
|
|
|
__ynieee128;
|
|
|
|
}
|
|
|
|
}
|
2018-06-28 08:27:50 +00:00
|
|
|
libc {
|
|
|
|
LDBL_IBM128_VERSION {
|
|
|
|
__strfromieee128;
|
|
|
|
__strtoieee128;
|
|
|
|
__strtoieee128_l;
|
|
|
|
__wcstoieee128;
|
|
|
|
__wcstoieee128_l;
|
ldbl-128ibm-compat: Add printf_size
Since the addition of the _Float128 API, strfromf128 and printf_size use
__printf_fp to print _Float128 values. This is achieved by setting the
'is_binary128' member of the 'printf_info' structure to one. Now that
the format of long double on powerpc64le is getting a third option, this
mechanism is reused for long double values that have binary128 format
(i.e.: when -mabi=ieeelongdouble).
This patch adds __printf_sizeieee128 as an exported symbol, but doesn't
provide redirections from printf_size, yet. All redirections will be
installed in a future commit, once all other functions that print or
read long double values with binary128 format are ready. In
__printf_fp, when 'is_binary128' is one, the floating-point argument is
treated as if it was of _Float128 type, regardless of the value of
'is_long_double', thus __printf_sizeieee128 sets 'is_binary128' to the
same value of 'is_long_double'. Otherwise, double values would not be
printed correctly.
Tested for powerpc64le.
2018-06-29 01:38:55 +00:00
|
|
|
|
|
|
|
__printf_sizeieee128;
|
ldbl-128ibm-compat: Add regular character printing functions
The 'mode' argument to __vfprintf_internal allows the selection of the
long double format for all long double arguments requested by the format
string. Currently, there are two possibilities: long double with the
same format as double or long double as something else. The 'something
else' format varies between architectures, and on powerpc64le, it means
IBM Extended Precision format.
In preparation for the third option of long double format on
powerpc64le, this patch uses the new mode mask,
PRINTF_LDBL_USES_FLOAT128, which tells __vfprintf_internal to save the
floating-point values into variables of type __float128 and adjusts the
parameters to __printf_fp and __printf_fphex as if it was a call from
strfromf128.
Many files from the stdio-common, wcsmbs, argp, misc, and libio
directories will have IEEE binary128 counterparts. Setting the correct
compiler options to these files (original and counterparts) would
produce a large amount of repetitive Makefile rules. To avoid this
repetition, this patch adds a Makefile routine that iterates over the
files adding or removing the appropriate flags.
Tested for powerpc64le.
Reviewed-By: Florian Weimer <fweimer@redhat.com>
Reviewed-By: Joseph Myers <joseph@codesourcery.com>
Reviewed-By: Paul E. Murphy <murphyp@linux.ibm.com>
2019-08-08 13:42:35 +00:00
|
|
|
|
|
|
|
__asprintfieee128;
|
|
|
|
__dprintfieee128;
|
|
|
|
__fprintfieee128;
|
|
|
|
__printfieee128;
|
|
|
|
__snprintfieee128;
|
|
|
|
__sprintfieee128;
|
|
|
|
|
|
|
|
__vasprintfieee128;
|
|
|
|
__vdprintfieee128;
|
|
|
|
__vfprintfieee128;
|
|
|
|
__vprintfieee128;
|
|
|
|
__vsnprintfieee128;
|
|
|
|
__vsprintfieee128;
|
2019-07-11 14:46:51 +00:00
|
|
|
|
|
|
|
__fwprintfieee128;
|
|
|
|
__swprintfieee128;
|
|
|
|
__wprintfieee128;
|
|
|
|
|
|
|
|
__vfwprintfieee128;
|
|
|
|
__vswprintfieee128;
|
|
|
|
__vwprintfieee128;
|
2018-06-28 08:27:50 +00:00
|
|
|
}
|
ldbl-128ibm-compat: Add regular character printing functions
The 'mode' argument to __vfprintf_internal allows the selection of the
long double format for all long double arguments requested by the format
string. Currently, there are two possibilities: long double with the
same format as double or long double as something else. The 'something
else' format varies between architectures, and on powerpc64le, it means
IBM Extended Precision format.
In preparation for the third option of long double format on
powerpc64le, this patch uses the new mode mask,
PRINTF_LDBL_USES_FLOAT128, which tells __vfprintf_internal to save the
floating-point values into variables of type __float128 and adjusts the
parameters to __printf_fp and __printf_fphex as if it was a call from
strfromf128.
Many files from the stdio-common, wcsmbs, argp, misc, and libio
directories will have IEEE binary128 counterparts. Setting the correct
compiler options to these files (original and counterparts) would
produce a large amount of repetitive Makefile rules. To avoid this
repetition, this patch adds a Makefile routine that iterates over the
files adding or removing the appropriate flags.
Tested for powerpc64le.
Reviewed-By: Florian Weimer <fweimer@redhat.com>
Reviewed-By: Joseph Myers <joseph@codesourcery.com>
Reviewed-By: Paul E. Murphy <murphyp@linux.ibm.com>
2019-08-08 13:42:35 +00:00
|
|
|
}
|