summaryrefslogtreecommitdiff
path: root/src/get_d128.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2020-07-20 21:45:20 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2020-07-20 21:45:20 +0000
commita248827baa5ab43c6f6982b12fe9b3ea26cac30b (patch)
tree48ed4714e5150c8f89e72e6b5ca32f821098deb8 /src/get_d128.c
parent7b86d1e17e0a38c2dacb4a6c5e20a7d6d3a9a14e (diff)
downloadmpfr-a248827baa5ab43c6f6982b12fe9b3ea26cac30b.tar.gz
[src/get_d128.c] Updated FIXME comment (after r14087).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@14092 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/get_d128.c')
-rw-r--r--src/get_d128.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/get_d128.c b/src/get_d128.c
index ed7464002..3845f9726 100644
--- a/src/get_d128.c
+++ b/src/get_d128.c
@@ -25,6 +25,21 @@ along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see
https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */
+/* Warning! Do not use any conversion between binary and decimal types,
+ * otherwise GCC will generate from 2 to 3 MB of code (depending on the
+ * GCC version) in the MPFR shared library when the _Decimal128 format
+ * is BID (e.g. on x86).
+ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96173
+ * https://gforge.inria.fr/tracker/index.php?func=detail&aid=21849&group_id=136&atid=619
+ *
+ * FIXME: Try to save even more space in the MPFR library by avoiding
+ * _Decimal128 operations entirely. These operations now appear only in
+ * string_to_Decimal128(). In the case where the _Decimal128 format is
+ * recognized as BID, this function should be reimplemented directly by
+ * using the specification of the encoding of this format, as already
+ * done for _Decimal64 (see string_to_Decimal64 in get_d64.c).
+ */
+
#include "mpfr-impl.h"
#include "ieee_floats.h"
@@ -36,18 +51,6 @@ https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
# define DEC128_MAX 9.999999999999999999999999999999999E6144dl
#endif
-/* FIXME: The double to _Decimal128 conversions
- * (_Decimal128) MPFR_DBL_NAN
- * (_Decimal128) (negative ? MPFR_DBL_INFM : MPFR_DBL_INFP)
- * below makes GCC generate 3 MB of code:
- * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96173
- * https://gforge.inria.fr/tracker/index.php?func=detail&aid=21849&group_id=136&atid=619
- * They could be avoided by accessing the fields directly like
- * in get_d64.c for _Decimal64.
- * Another MB or so could be saved with a direct implementation of
- * string_to_Decimal128 (i.e. avoiding _Decimal128 operations).
- */
-
/* construct a decimal128 NaN */
static _Decimal128
get_decimal128_nan (void)