libdecnumber: Sync with GCC
This commit is contained in:
parent
b0f49e3fd7
commit
f57a3bca61
|
@ -1,3 +1,53 @@
|
||||||
|
2018-02-19 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
PR c/81272
|
||||||
|
* decNumber.c (decCompareOp): Do not use bit and
|
||||||
|
for conjunction of predicates.
|
||||||
|
|
||||||
|
2018-01-03 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
Update copyright years.
|
||||||
|
|
||||||
|
2017-05-29 Sylvestre Ledru <sylvestre@debian.org>
|
||||||
|
|
||||||
|
* bid/bid2dpd_dpd2bid.c (_bid_to_dpd32): Fix whitespace.
|
||||||
|
(_dpd_to_bid32): Simplify identical code on multiple branches.
|
||||||
|
Fix whitespace.
|
||||||
|
(_bid_to_dpd64, _dpd_to_bid64): Likewise.
|
||||||
|
(_bid_to_dpd128, _dpd_to_bid128): Likewise.
|
||||||
|
|
||||||
|
2017-04-03 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
|
* decCommon.c (decFloatFromPackedChecked): Fix typo in comment.
|
||||||
|
* decNumber.c (decNumberPower, decMultiplyOp): Likewise.
|
||||||
|
|
||||||
|
2017-01-08 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR bootstrap/79003
|
||||||
|
* Makefile.in (CFLAGS, CPPFLAGS, LDFLAGS): Remove -fno-lto.
|
||||||
|
(NOLTO_FLAGS): New variable.
|
||||||
|
(ALL_CFLAGS): Use it.
|
||||||
|
* configure.ac (nolto_flags): New ACX_PROG_CC_WARNING_OPTS,
|
||||||
|
check for whether -fno-lto works.
|
||||||
|
* configure: Regenerated.
|
||||||
|
|
||||||
|
2017-01-06 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
PR bootstrap/79003
|
||||||
|
* Makefile.in: Add -fno-lto to {C,CPP,LD}FLAGS.
|
||||||
|
|
||||||
|
2017-01-01 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
Update copyright years.
|
||||||
|
|
||||||
|
2016-11-15 Matthias Klose <doko@ubuntu.com>
|
||||||
|
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
|
2016-01-04 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
Update copyright years.
|
||||||
|
|
||||||
2015-07-14 H.J. Lu <hongjiu.lu@intel.com>
|
2015-07-14 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* configure: Regenerated.
|
* configure: Regenerated.
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
2014-09-24 David Malcolm <dmalcolm@redhat.com>
|
||||||
|
|
||||||
|
* ChangeLog.jit: Add copyright footer.
|
||||||
|
|
||||||
|
2013-10-07 David Malcolm <dmalcolm@redhat.com>
|
||||||
|
|
||||||
|
* Makefile.in: Set PICFLAG from configure script; add it to
|
||||||
|
ALL_CFLAGS.
|
||||||
|
* configure.ac (--enable-host-shared): Set up PICFLAG rather
|
||||||
|
than attempting to append -fPIC to CFLAGS, CXXFLAGS, LDFLAGS.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
|
2013-10-03 David Malcolm <dmalcolm@redhat.com>
|
||||||
|
|
||||||
|
* configure.ac: Add --enable-host-shared.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
|
Copyright (C) 2013-2014 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved.
|
|
@ -1,7 +1,7 @@
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
# Makefile for libdecnumber. Run 'configure' to generate Makefile from Makefile.in
|
# Makefile for libdecnumber. Run 'configure' to generate Makefile from Makefile.in
|
||||||
|
|
||||||
# Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
# Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
#This file is part of GCC.
|
#This file is part of GCC.
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ PICFLAG = @PICFLAG@
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
SHELL = @SHELL@
|
SHELL = @SHELL@
|
||||||
objext = @OBJEXT@
|
objext = @OBJEXT@
|
||||||
|
NOLTO_FLAGS = @nolto_flags@
|
||||||
|
|
||||||
datarootdir = @datarootdir@
|
datarootdir = @datarootdir@
|
||||||
datadir = @datadir@
|
datadir = @datadir@
|
||||||
|
@ -58,7 +59,8 @@ enable_decimal_float= @enable_decimal_float@
|
||||||
|
|
||||||
INCLUDES = -I$(srcdir) -I.
|
INCLUDES = -I$(srcdir) -I.
|
||||||
|
|
||||||
ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(PICFLAG)
|
ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(NOLTO_FLAGS) $(INCLUDES) $(CPPFLAGS) \
|
||||||
|
$(PICFLAG)
|
||||||
|
|
||||||
bid_OBJS = bid2dpd_dpd2bid.$(objext) host-ieee32.$(objext) \
|
bid_OBJS = bid2dpd_dpd2bid.$(objext) host-ieee32.$(objext) \
|
||||||
host-ieee64.$(objext) host-ieee128.$(objext)
|
host-ieee64.$(objext) host-ieee128.$(objext)
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
|
# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
|
||||||
|
# Inc.
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
/* Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
/* Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
@ -138,7 +138,8 @@ _dpd_to_bid32 (_Decimal32 *pres, _Decimal32 *px) {
|
||||||
if ((x & 0x78000000) == 0x78000000) {
|
if ((x & 0x78000000) == 0x78000000) {
|
||||||
*pres = x;
|
*pres = x;
|
||||||
return;
|
return;
|
||||||
} else { /* normal number */
|
}
|
||||||
|
/* normal number */
|
||||||
if ((x & 0x60000000) == 0x60000000) { /* G0..G1 = 11 -> d0 = 8 + G4 */
|
if ((x & 0x60000000) == 0x60000000) { /* G0..G1 = 11 -> d0 = 8 + G4 */
|
||||||
d0 = d2b3[((x >> 26) & 1) | 8]; /* d0 = (comb & 0x0100 ? 9 : 8); */
|
d0 = d2b3[((x >> 26) & 1) | 8]; /* d0 = (comb & 0x0100 ? 9 : 8); */
|
||||||
exp = (x >> 27) & 3; /* exp leading bits are G2..G3 */
|
exp = (x >> 27) & 3; /* exp leading bits are G2..G3 */
|
||||||
|
@ -161,7 +162,6 @@ _dpd_to_bid32 (_Decimal32 *pres, _Decimal32 *px) {
|
||||||
/* add coeff, without leading bits */
|
/* add coeff, without leading bits */
|
||||||
r |= (((unsigned int) bcoeff) & 0x1fffff);
|
r |= (((unsigned int) bcoeff) & 0x1fffff);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
*pres = r;
|
*pres = r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,8 @@ _bid_to_dpd64 (_Decimal64 *pres, _Decimal64 *px) {
|
||||||
if ((comb & 0xf00) == 0xf00) {
|
if ((comb & 0xf00) == 0xf00) {
|
||||||
*pres = x;
|
*pres = x;
|
||||||
return;
|
return;
|
||||||
} else { /* Normal number */
|
}
|
||||||
|
/* Normal number */
|
||||||
if ((comb & 0xc00) == 0xc00) { /* G0..G1 = 11 -> exp is G2..G11 */
|
if ((comb & 0xc00) == 0xc00) { /* G0..G1 = 11 -> exp is G2..G11 */
|
||||||
exp = (comb) & 0x3ff;
|
exp = (comb) & 0x3ff;
|
||||||
bcoeff = (x & 0x0007ffffffffffffull) | 0x0020000000000000ull;
|
bcoeff = (x & 0x0007ffffffffffffull) | 0x0020000000000000ull;
|
||||||
|
@ -217,7 +218,6 @@ _bid_to_dpd64 (_Decimal64 *pres, _Decimal64 *px) {
|
||||||
else /* else b0 is 0..7 */
|
else /* else b0 is 0..7 */
|
||||||
res = sign | ((((exp >> 8) << 11) | (b0 << 8) |
|
res = sign | ((((exp >> 8) << 11) | (b0 << 8) |
|
||||||
(exp & 0xff)) << 50) | dcoeff;
|
(exp & 0xff)) << 50) | dcoeff;
|
||||||
}
|
|
||||||
*pres = res;
|
*pres = res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,17 +237,10 @@ _dpd_to_bid64 (_Decimal64 *pres, _Decimal64 *px) {
|
||||||
comb = (x & 0x7ffc000000000000ull) >> 50;
|
comb = (x & 0x7ffc000000000000ull) >> 50;
|
||||||
trailing = (x & 0x0003ffffffffffffull);
|
trailing = (x & 0x0003ffffffffffffull);
|
||||||
if ((comb & 0x1e00) == 0x1e00) {
|
if ((comb & 0x1e00) == 0x1e00) {
|
||||||
if ((comb & 0x1f00) == 0x1f00) { /* G0..G4 = 11111 -> NaN */
|
|
||||||
if (comb & 0x0100) { /* G5 = 1 -> sNaN */
|
|
||||||
*pres = x;
|
*pres = x;
|
||||||
} else { /* G5 = 0 -> qNaN */
|
|
||||||
*pres = x;
|
|
||||||
}
|
|
||||||
} else { /*if ((comb & 0x1e00) == 0x1e00); G0..G4 = 11110 -> INF */
|
|
||||||
*pres = x;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
} else { /* normal number */
|
}
|
||||||
|
/* normal number */
|
||||||
if ((comb & 0x1800) == 0x1800) { /* G0..G1 = 11 -> d0 = 8 + G4 */
|
if ((comb & 0x1800) == 0x1800) { /* G0..G1 = 11 -> d0 = 8 + G4 */
|
||||||
d0 = d2b6[((comb >> 8) & 1) | 8]; /* d0 = (comb & 0x0100 ? 9 : 8); */
|
d0 = d2b6[((comb >> 8) & 1) | 8]; /* d0 = (comb & 0x0100 ? 9 : 8); */
|
||||||
exp = (comb & 0x600) >> 1; /* exp = (comb & 0x0400 ? 1 : 0) * 0x200 +
|
exp = (comb & 0x600) >> 1; /* exp = (comb & 0x0400 ? 1 : 0) * 0x200 +
|
||||||
|
@ -279,7 +272,6 @@ _dpd_to_bid64 (_Decimal64 *pres, _Decimal64 *px) {
|
||||||
mask = (mask >> 2) - 1;
|
mask = (mask >> 2) - 1;
|
||||||
bcoeff &= mask;
|
bcoeff &= mask;
|
||||||
res |= bcoeff;
|
res |= bcoeff;
|
||||||
}
|
|
||||||
*pres = res;
|
*pres = res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,15 +296,7 @@ _bid_to_dpd128 (_Decimal128 *pres, _Decimal128 *px) {
|
||||||
comb = (x.w[1] /*& 0x7fffc00000000000ull */ ) >> 46;
|
comb = (x.w[1] /*& 0x7fffc00000000000ull */ ) >> 46;
|
||||||
exp = 0;
|
exp = 0;
|
||||||
if ((comb & 0x1e000) == 0x1e000) {
|
if ((comb & 0x1e000) == 0x1e000) {
|
||||||
if ((comb & 0x1f000) == 0x1f000) { /* G0..G4 = 11111 -> NaN */
|
|
||||||
if (comb & 0x01000) { /* G5 = 1 -> sNaN */
|
|
||||||
res = x;
|
res = x;
|
||||||
} else { /* G5 = 0 -> qNaN */
|
|
||||||
res = x;
|
|
||||||
}
|
|
||||||
} else { /* G0..G4 = 11110 -> INF */
|
|
||||||
res = x;
|
|
||||||
}
|
|
||||||
} else { /* normal number */
|
} else { /* normal number */
|
||||||
exp = ((x.w[1] & 0x7fff000000000000ull) >> 49) & 0x3fff;
|
exp = ((x.w[1] & 0x7fff000000000000ull) >> 49) & 0x3fff;
|
||||||
bcoeff.w[1] = (x.w[1] & 0x0001ffffffffffffull);
|
bcoeff.w[1] = (x.w[1] & 0x0001ffffffffffffull);
|
||||||
|
@ -382,17 +366,9 @@ _dpd_to_bid128 (_Decimal128 *pres, _Decimal128 *px) {
|
||||||
trailing.w[1] = x.w[1];
|
trailing.w[1] = x.w[1];
|
||||||
trailing.w[0] = x.w[0];
|
trailing.w[0] = x.w[0];
|
||||||
if ((comb & 0x1e000) == 0x1e000) {
|
if ((comb & 0x1e000) == 0x1e000) {
|
||||||
if ((comb & 0x1f000) == 0x1f000) { /* G0..G4 = 11111 -> NaN */
|
|
||||||
if (comb & 0x01000) { /* G5 = 1 -> sNaN */
|
|
||||||
*pres = x;
|
*pres = x;
|
||||||
} else { /* G5 = 0 -> qNaN */
|
|
||||||
*pres = x;
|
|
||||||
}
|
|
||||||
} else { /* G0..G4 = 11110 -> INF */
|
|
||||||
*pres = x;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
} else { /* Normal number */
|
}
|
||||||
if ((comb & 0x18000) == 0x18000) { /* G0..G1 = 11 -> d0 = 8 + G4 */
|
if ((comb & 0x18000) == 0x18000) { /* G0..G1 = 11 -> d0 = 8 + G4 */
|
||||||
d0 = d2b6[8 + ((comb & 0x01000) >> 12)];
|
d0 = d2b6[8 + ((comb & 0x01000) >> 12)];
|
||||||
exp = (comb & 0x06000) >> 1; /* exp leading bits are G2..G3 */
|
exp = (comb & 0x06000) >> 1; /* exp leading bits are G2..G3 */
|
||||||
|
@ -418,6 +394,5 @@ _dpd_to_bid128 (_Decimal128 *pres, _Decimal128 *px) {
|
||||||
exp += (comb & 0xfff);
|
exp += (comb & 0xfff);
|
||||||
res.w[0] = bcoeff.w[0];
|
res.w[0] = bcoeff.w[0];
|
||||||
res.w[1] = (exp << 49) | sign.w[1] | bcoeff.w[1];
|
res.w[1] = (exp << 49) | sign.w[1] | bcoeff.w[1];
|
||||||
}
|
|
||||||
*pres = res;
|
*pres = res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
/* Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
/* Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
/* Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
/* Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* This is a software decimal floating point library.
|
/* This is a software decimal floating point library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* This is a software decimal floating point library.
|
/* This is a software decimal floating point library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* This is a software decimal floating point library.
|
/* This is a software decimal floating point library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -613,6 +613,7 @@ EGREP
|
||||||
GREP
|
GREP
|
||||||
CPP
|
CPP
|
||||||
WERROR
|
WERROR
|
||||||
|
nolto_flags
|
||||||
WARN_PEDANTIC
|
WARN_PEDANTIC
|
||||||
WARN_CFLAGS
|
WARN_CFLAGS
|
||||||
AUTOHEADER
|
AUTOHEADER
|
||||||
|
@ -3382,6 +3383,64 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ac_ext=c
|
||||||
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
|
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
|
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||||
|
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
|
||||||
|
nolto_flags=
|
||||||
|
save_CFLAGS="$CFLAGS"
|
||||||
|
for real_option in -fno-lto; do
|
||||||
|
# Do the check with the no- prefix removed since gcc silently
|
||||||
|
# accepts any -Wno-* option on purpose
|
||||||
|
case $real_option in
|
||||||
|
-Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
|
||||||
|
*) option=$real_option ;;
|
||||||
|
esac
|
||||||
|
as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
|
||||||
|
$as_echo_n "checking whether $CC supports $option... " >&6; }
|
||||||
|
if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
CFLAGS="$option"
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
eval "$as_acx_Woption=yes"
|
||||||
|
else
|
||||||
|
eval "$as_acx_Woption=no"
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
|
fi
|
||||||
|
eval ac_res=\$$as_acx_Woption
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||||
|
$as_echo "$ac_res" >&6; }
|
||||||
|
if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
|
||||||
|
nolto_flags="$nolto_flags${nolto_flags:+ }$real_option"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
CFLAGS="$save_CFLAGS"
|
||||||
|
ac_ext=c
|
||||||
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
|
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
|
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||||
|
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Only enable with --enable-werror-always until existing warnings are
|
# Only enable with --enable-werror-always until existing warnings are
|
||||||
# corrected.
|
# corrected.
|
||||||
ac_ext=c
|
ac_ext=c
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# configure.ac for libdecnumber -*- Autoconf -*-
|
# configure.ac for libdecnumber -*- Autoconf -*-
|
||||||
# Process this file with autoconf to generate a configuration script.
|
# Process this file with autoconf to generate a configuration script.
|
||||||
|
|
||||||
# Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
# Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This file is part of GCC.
|
# This file is part of GCC.
|
||||||
|
|
||||||
|
@ -43,6 +43,8 @@ ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
|
||||||
-Wmissing-format-attribute -Wcast-qual])
|
-Wmissing-format-attribute -Wcast-qual])
|
||||||
ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long])
|
ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long])
|
||||||
|
|
||||||
|
ACX_PROG_CC_WARNING_OPTS([-fno-lto], [nolto_flags])
|
||||||
|
|
||||||
# Only enable with --enable-werror-always until existing warnings are
|
# Only enable with --enable-werror-always until existing warnings are
|
||||||
# corrected.
|
# corrected.
|
||||||
ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
|
ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Configure decNumber for either host or target.
|
/* Configure decNumber for either host or target.
|
||||||
Copyright (C) 2008-2013 Free Software Foundation, Inc.
|
Copyright (C) 2008-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Common base code for the decNumber C Library.
|
/* Common base code for the decNumber C Library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Common code for fixed-size types in the decNumber C Library.
|
/* Common code for fixed-size types in the decNumber C Library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
@ -713,7 +713,7 @@ decFloat * decFloatFromPacked(decFloat *df, Int exp, const uByte *packed) {
|
||||||
/* returns df, which will be canonical or NULL if any of the */
|
/* returns df, which will be canonical or NULL if any of the */
|
||||||
/* requirements are not met (if this case df is unchanged); that */
|
/* requirements are not met (if this case df is unchanged); that */
|
||||||
/* is, the input data must be as returned by decFloatToPacked, */
|
/* is, the input data must be as returned by decFloatToPacked, */
|
||||||
/* except that all six sign codes are acccepted. */
|
/* except that all six sign codes are accepted. */
|
||||||
/* */
|
/* */
|
||||||
/* No status will be set. */
|
/* No status will be set. */
|
||||||
/* ------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------ */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Decimal context module for the decNumber C Library.
|
/* Decimal context module for the decNumber C Library.
|
||||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Decimal context header module for the decNumber C Library.
|
/* Decimal context header module for the decNumber C Library.
|
||||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Conversion lookup tables for the decNumber C Library.
|
/* Conversion lookup tables for the decNumber C Library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* decDouble module for the decNumber C Library.
|
/* decDouble module for the decNumber C Library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* decDouble module header for the decNumber C Library.
|
/* decDouble module header for the decNumber C Library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Temporary library support for decimal floating point.
|
/* Temporary library support for decimal floating point.
|
||||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Temporary library support for decimal floating point.
|
/* Temporary library support for decimal floating point.
|
||||||
Copyright (C) 2006-2013 Free Software Foundation, Inc.
|
Copyright (C) 2006-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Temporary library support for decimal floating point.
|
/* Temporary library support for decimal floating point.
|
||||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Decimal number arithmetic module for the decNumber C Library.
|
/* Decimal number arithmetic module for the decNumber C Library.
|
||||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
@ -2171,7 +2171,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs,
|
||||||
/* if a negative power the constant 1 is needed, and if not subset */
|
/* if a negative power the constant 1 is needed, and if not subset */
|
||||||
/* invert the lhs now rather than inverting the result later */
|
/* invert the lhs now rather than inverting the result later */
|
||||||
if (decNumberIsNegative(rhs)) { /* was a **-n [hence digits>0] */
|
if (decNumberIsNegative(rhs)) { /* was a **-n [hence digits>0] */
|
||||||
decNumber *inv=invbuff; /* asssume use fixed buffer */
|
decNumber *inv=invbuff; /* assume use fixed buffer */
|
||||||
decNumberCopy(&dnOne, dac); /* dnOne=1; [needed now or later] */
|
decNumberCopy(&dnOne, dac); /* dnOne=1; [needed now or later] */
|
||||||
#if DECSUBSET
|
#if DECSUBSET
|
||||||
if (set->extended) { /* need to calculate 1/lhs */
|
if (set->extended) { /* need to calculate 1/lhs */
|
||||||
|
@ -5197,7 +5197,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
|
||||||
/* exp(-x) where x can be the tiniest number (Ntiny). */
|
/* exp(-x) where x can be the tiniest number (Ntiny). */
|
||||||
/* */
|
/* */
|
||||||
/* 2. Normalizing x to be <=0.1 (instead of <=1) reduces loop */
|
/* 2. Normalizing x to be <=0.1 (instead of <=1) reduces loop */
|
||||||
/* iterations by appoximately a third with additional (although */
|
/* iterations by approximately a third with additional (although */
|
||||||
/* diminishing) returns as the range is reduced to even smaller */
|
/* diminishing) returns as the range is reduced to even smaller */
|
||||||
/* fractions. However, h (the power of 10 used to correct the */
|
/* fractions. However, h (the power of 10 used to correct the */
|
||||||
/* result at the end, see below) must be kept <=8 as otherwise */
|
/* result at the end, see below) must be kept <=8 as otherwise */
|
||||||
|
@ -6029,11 +6029,11 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
|
||||||
|
|
||||||
/* If total ordering then handle differing signs 'up front' */
|
/* If total ordering then handle differing signs 'up front' */
|
||||||
if (op==COMPTOTAL) { /* total ordering */
|
if (op==COMPTOTAL) { /* total ordering */
|
||||||
if (decNumberIsNegative(lhs) & !decNumberIsNegative(rhs)) {
|
if (decNumberIsNegative(lhs) && !decNumberIsNegative(rhs)) {
|
||||||
result=-1;
|
result=-1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!decNumberIsNegative(lhs) & decNumberIsNegative(rhs)) {
|
if (!decNumberIsNegative(lhs) && decNumberIsNegative(rhs)) {
|
||||||
result=+1;
|
result=+1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Decimal number arithmetic module header for the decNumber C Library.
|
/* Decimal number arithmetic module header for the decNumber C Library.
|
||||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Local definitions for the decNumber C Library.
|
/* Local definitions for the decNumber C Library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Packed decimal conversion module for the decNumber C Library.
|
/* Packed decimal conversion module for the decNumber C Library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Packed decimal conversion module header for the decNumber C Library.
|
/* Packed decimal conversion module header for the decNumber C Library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* decQuad module for the decNumber C Library.
|
/* decQuad module for the decNumber C Library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* decQuad module header for the decNumber C Library.
|
/* decQuad module header for the decNumber C Library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* Internal testing support for rounding for decimal float.
|
/* Internal testing support for rounding for decimal float.
|
||||||
|
|
||||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* Internal testing support for rounding for decimal float.
|
/* Internal testing support for rounding for decimal float.
|
||||||
|
|
||||||
Copyright (C) 2006-2013 Free Software Foundation, Inc.
|
Copyright (C) 2006-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* decSingle module for the decNumber C Library.
|
/* decSingle module for the decNumber C Library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* decSingle module header for the decNumber C Library.
|
/* decSingle module header for the decNumber C Library.
|
||||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Decimal 128-bit format module for the decNumber C Library.
|
/* Decimal 128-bit format module for the decNumber C Library.
|
||||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Decimal 128-bit format module header for the decNumber C Library.
|
/* Decimal 128-bit format module header for the decNumber C Library.
|
||||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Local definitions for use with the decNumber C Library.
|
/* Local definitions for use with the decNumber C Library.
|
||||||
Copyright (C) 2007-2013 Free Software Foundation, Inc.
|
Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Decimal 32-bit format module for the decNumber C Library.
|
/* Decimal 32-bit format module for the decNumber C Library.
|
||||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Decimal 32-bit format module header for the decNumber C Library.
|
/* Decimal 32-bit format module header for the decNumber C Library.
|
||||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Decimal 64-bit format module for the decNumber C Library.
|
/* Decimal 64-bit format module for the decNumber C Library.
|
||||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Decimal 64-bit format module header for the decNumber C Library.
|
/* Decimal 64-bit format module header for the decNumber C Library.
|
||||||
Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
Copyright (C) 2005-2018 Free Software Foundation, Inc.
|
||||||
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
Contributed by IBM Corporation. Author Mike Cowlishaw.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
Loading…
Reference in New Issue