Commit b2a00c89 by H.J. Lu Committed by H.J. Lu

Makefile.in (dfp-filenames): Replace decimal_globals...

libgcc/

2007-09-27  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.in (dfp-filenames): Replace decimal_globals,
	decimal_data, binarydecimal and convert_data with
	bid_decimal_globals, bid_decimal_data, bid_binarydecimal
	and bid_convert_data, respectively.

libgcc/config/libbid/

2007-09-27  H.J. Lu  <hongjiu.lu@intel.com>

	* bid128_fromstring.c: Removed.

	* bid_dpd.c: New from libbid 2007-09-26.
	* bid128_to_int16.c: Likewise.
	* bid128_to_int8.c: Likewise.
	* bid128_to_uint8.c: Likewise.
	* bid128_to_uint16.c: Likewise.
	* bid64_to_int16.c: Likewise.
	* bid64_to_int8.c: Likewise.
	* bid64_to_uint16.c: Likewise.
	* bid64_to_uint8.c: Likewise.

	* bid128_2_str.h: Updated from libbid 2007-09-26.
	* bid128_2_str_macros.h: Likewise.
	* bid128_2_str_tables.c: Likewise.
	* bid128_add.c: Likewise.
	* bid128.c: Likewise.
	* bid128_compare.c: Likewise.
	* bid128_div.c: Likewise.
	* bid128_fma.c: Likewise.
	* bid128_logb.c: Likewise.
	* bid128_minmax.c: Likewise.
	* bid128_mul.c: Likewise.
	* bid128_next.c: Likewise.
	* bid128_noncomp.c: Likewise.
	* bid128_quantize.c: Likewise.
	* bid128_rem.c: Likewise.
	* bid128_round_integral.c: Likewise.
	* bid128_scalb.c: Likewise.
	* bid128_sqrt.c: Likewise.
	* bid128_string.c: Likewise.
	* bid128_to_int32.c: Likewise.
	* bid128_to_int64.c: Likewise.
	* bid128_to_uint32.c: Likewise.
	* bid128_to_uint64.c: Likewise.
	* bid32_to_bid128.c: Likewise.
	* bid32_to_bid64.c: Likewise.
	* bid64_add.c: Likewise.
	* bid64_compare.c: Likewise.
	* bid64_div.c: Likewise.
	* bid64_fma.c: Likewise.
	* bid64_logb.c: Likewise.
	* bid64_minmax.c: Likewise.
	* bid64_mul.c: Likewise.
	* bid64_next.c: Likewise.
	* bid64_noncomp.c: Likewise.
	* bid64_quantize.c: Likewise.
	* bid64_rem.c: Likewise.
	* bid64_round_integral.c: Likewise.
	* bid64_scalb.c: Likewise.
	* bid64_sqrt.c: Likewise.
	* bid64_string.c: Likewise.
	* bid64_to_bid128.c: Likewise.
	* bid64_to_int32.c: Likewise.
	* bid64_to_int64.c: Likewise.
	* bid64_to_uint32.c: Likewise.
	* bid64_to_uint64.c: Likewise.
	* bid_b2d.h: Likewise.
	* bid_binarydecimal.c: Likewise.
	* bid_conf.h: Likewise.
	* bid_convert_data.c: Likewise.
	* bid_decimal_data.c: Likewise.
	* bid_decimal_globals.c: Likewise.
	* bid_div_macros.h: Likewise.
	* bid_flag_operations.c: Likewise.
	* bid_from_int.c: Likewise.
	* bid_functions.h: Likewise.
	* bid_gcc_intrinsics.h: Likewise.
	* bid_inline_add.h: Likewise.
	* bid_internal.h: Likewise.
	* bid_round.c: Likewise.
	* bid_sqrt_macros.h: Likewise.
	* _addsub_dd.c: Likewise.
	* _addsub_sd.c: Likewise.
	* _addsub_td.c: Likewise.
	* _dd_to_df.c: Likewise.
	* _dd_to_di.c: Likewise.
	* _dd_to_sd.c: Likewise.
	* _dd_to_sf.c: Likewise.
	* _dd_to_si.c: Likewise.
	* _dd_to_td.c: Likewise.
	* _dd_to_tf.c: Likewise.
	* _dd_to_udi.c: Likewise.
	* _dd_to_usi.c: Likewise.
	* _dd_to_xf.c: Likewise.
	* _df_to_dd.c: Likewise.
	* _df_to_sd.c: Likewise.
	* _df_to_td.c: Likewise.
	* _di_to_dd.c: Likewise.
	* _di_to_sd.c: Likewise.
	* _di_to_td.c: Likewise.
	* _div_dd.c: Likewise.
	* _div_sd.c: Likewise.
	* _div_td.c: Likewise.
	* _eq_dd.c: Likewise.
	* _eq_sd.c: Likewise.
	* _eq_td.c: Likewise.
	* _ge_dd.c: Likewise.
	* _ge_sd.c: Likewise.
	* _ge_td.c: Likewise.
	* _gt_dd.c: Likewise.
	* _gt_sd.c: Likewise.
	* _gt_td.c: Likewise.
	* _isinfd128.c: Likewise.
	* _isinfd32.c: Likewise.
	* _isinfd64.c: Likewise.
	* _le_dd.c: Likewise.
	* _le_sd.c: Likewise.
	* _le_td.c: Likewise.
	* _lt_dd.c: Likewise.
	* _lt_sd.c: Likewise.
	* _lt_td.c: Likewise.
	* _mul_dd.c: Likewise.
	* _mul_sd.c: Likewise.
	* _mul_td.c: Likewise.
	* _ne_dd.c: Likewise.
	* _ne_sd.c: Likewise.
	* _ne_td.c: Likewise.
	* _sd_to_dd.c: Likewise.
	* _sd_to_df.c: Likewise.
	* _sd_to_di.c: Likewise.
	* _sd_to_sf.c: Likewise.
	* _sd_to_si.c: Likewise.
	* _sd_to_td.c: Likewise.
	* _sd_to_tf.c: Likewise.
	* _sd_to_udi.c: Likewise.
	* _sd_to_usi.c: Likewise.
	* _sd_to_xf.c: Likewise.
	* _sf_to_dd.c: Likewise.
	* _sf_to_sd.c: Likewise.
	* _sf_to_td.c: Likewise.
	* _si_to_dd.c: Likewise.
	* _si_to_sd.c: Likewise.
	* _si_to_td.c: Likewise.
	* _td_to_dd.c: Likewise.
	* _td_to_df.c: Likewise.
	* _td_to_di.c: Likewise.
	* _td_to_sd.c: Likewise.
	* _td_to_sf.c: Likewise.
	* _td_to_si.c: Likewise.
	* _td_to_tf.c: Likewise.
	* _td_to_udi.c: Likewise.
	* _td_to_usi.c: Likewise.
	* _td_to_xf.c: Likewise.
	* _tf_to_dd.c: Likewise.
	* _tf_to_sd.c: Likewise.
	* _tf_to_td.c: Likewise.
	* _udi_to_dd.c: Likewise.
	* _udi_to_sd.c: Likewise.
	* _udi_to_td.c: Likewise.
	* _unord_dd.c: Likewise.
	* _unord_sd.c: Likewise.
	* _unord_td.c: Likewise.
	* _usi_to_dd.c: Likewise.
	* _usi_to_sd.c: Likewise.
	* _usi_to_td.c: Likewise.
	* _xf_to_dd.c: Likewise.
	* _xf_to_sd.c: Likewise.
	* _xf_to_td.c: Likewise.

2007-09-27  H.J. Lu  <hongjiu.lu@intel.com>

	* b2d.h: Renamed to ...
	* bid_b2d.h: This.

	* bid128_to_string.c: Renamed to ...
	* bid128_string.c: This.

	* bid_intrinsics.h: Renamed to ...
	* bid_gcc_intrinsics.h: This.

	* bid_string.c: Renamed to ...
	* bid64_string.c: This.

	* binarydecimal.c: Renamed to ...
	* bid_decimal_globals.c: This.

	* convert_data.c: Renamed to ...
	* bid_convert_data.c: This.

	* decimal_data.c: Renamed to ...
	* bid_decimal_data.c: This.

	* decimal_globals.c: Renamed to ...
	* bid_decimal_globals.c: This.

	* div_macros.h: Renamed to ...
	* bid_div_macros.h: This.

	* inline_bid_add.h: Renamed to ...
	* bid_inline_add.h: This.

	* sqrt_macros.h: Renamed to ...
	* bid_sqrt_macros.h: This.

From-SVN: r128841
parent e233ac97
2007-09-27 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in (dfp-filenames): Replace decimal_globals,
decimal_data, binarydecimal and convert_data with
bid_decimal_globals, bid_decimal_data, bid_binarydecimal
and bid_convert_data, respectively.
2007-09-17 Chao-ying Fu <fu@mips.com>
Nigel Stephens <nigel@mips.com>
......
......@@ -478,9 +478,10 @@ endif
dfp-filenames =
ifneq ($(D32PBIT)$(D64PBIT)$(D128PBIT),)
ifeq ($(enable_decimal_float),bid)
dfp-filenames += decimal_globals decimal_data binarydecimal \
_isinfd32 _isinfd64 _isinfd128 bid64_noncomp bid128_noncomp \
bid128_fma bid_round bid_from_int convert_data \
dfp-filenames += bid_decimal_globals bid_decimal_data \
bid_binarydecimal bid_convert_data \
_isinfd32 _isinfd64 _isinfd128 bid64_noncomp \
bid128_noncomp bid128_fma bid_round bid_from_int \
bid64_add bid128_add bid64_div bid128_div \
bid64_mul bid128_mul bid64_compare bid128_compare \
bid128 bid32_to_bid64 bid32_to_bid128 bid64_to_bid128 \
......
2007-09-27 H.J. Lu <hongjiu.lu@intel.com>
* bid128_fromstring.c: Removed.
* bid_dpd.c: New from libbid 2007-09-26.
* bid128_to_int16.c: Likewise.
* bid128_to_int8.c: Likewise.
* bid128_to_uint8.c: Likewise.
* bid128_to_uint16.c: Likewise.
* bid64_to_int16.c: Likewise.
* bid64_to_int8.c: Likewise.
* bid64_to_uint16.c: Likewise.
* bid64_to_uint8.c: Likewise.
* bid128_2_str.h: Updated from libbid 2007-09-26.
* bid128_2_str_macros.h: Likewise.
* bid128_2_str_tables.c: Likewise.
* bid128_add.c: Likewise.
* bid128.c: Likewise.
* bid128_compare.c: Likewise.
* bid128_div.c: Likewise.
* bid128_fma.c: Likewise.
* bid128_logb.c: Likewise.
* bid128_minmax.c: Likewise.
* bid128_mul.c: Likewise.
* bid128_next.c: Likewise.
* bid128_noncomp.c: Likewise.
* bid128_quantize.c: Likewise.
* bid128_rem.c: Likewise.
* bid128_round_integral.c: Likewise.
* bid128_scalb.c: Likewise.
* bid128_sqrt.c: Likewise.
* bid128_string.c: Likewise.
* bid128_to_int32.c: Likewise.
* bid128_to_int64.c: Likewise.
* bid128_to_uint32.c: Likewise.
* bid128_to_uint64.c: Likewise.
* bid32_to_bid128.c: Likewise.
* bid32_to_bid64.c: Likewise.
* bid64_add.c: Likewise.
* bid64_compare.c: Likewise.
* bid64_div.c: Likewise.
* bid64_fma.c: Likewise.
* bid64_logb.c: Likewise.
* bid64_minmax.c: Likewise.
* bid64_mul.c: Likewise.
* bid64_next.c: Likewise.
* bid64_noncomp.c: Likewise.
* bid64_quantize.c: Likewise.
* bid64_rem.c: Likewise.
* bid64_round_integral.c: Likewise.
* bid64_scalb.c: Likewise.
* bid64_sqrt.c: Likewise.
* bid64_string.c: Likewise.
* bid64_to_bid128.c: Likewise.
* bid64_to_int32.c: Likewise.
* bid64_to_int64.c: Likewise.
* bid64_to_uint32.c: Likewise.
* bid64_to_uint64.c: Likewise.
* bid_b2d.h: Likewise.
* bid_binarydecimal.c: Likewise.
* bid_conf.h: Likewise.
* bid_convert_data.c: Likewise.
* bid_decimal_data.c: Likewise.
* bid_decimal_globals.c: Likewise.
* bid_div_macros.h: Likewise.
* bid_flag_operations.c: Likewise.
* bid_from_int.c: Likewise.
* bid_functions.h: Likewise.
* bid_gcc_intrinsics.h: Likewise.
* bid_inline_add.h: Likewise.
* bid_internal.h: Likewise.
* bid_round.c: Likewise.
* bid_sqrt_macros.h: Likewise.
* _addsub_dd.c: Likewise.
* _addsub_sd.c: Likewise.
* _addsub_td.c: Likewise.
* _dd_to_df.c: Likewise.
* _dd_to_di.c: Likewise.
* _dd_to_sd.c: Likewise.
* _dd_to_sf.c: Likewise.
* _dd_to_si.c: Likewise.
* _dd_to_td.c: Likewise.
* _dd_to_tf.c: Likewise.
* _dd_to_udi.c: Likewise.
* _dd_to_usi.c: Likewise.
* _dd_to_xf.c: Likewise.
* _df_to_dd.c: Likewise.
* _df_to_sd.c: Likewise.
* _df_to_td.c: Likewise.
* _di_to_dd.c: Likewise.
* _di_to_sd.c: Likewise.
* _di_to_td.c: Likewise.
* _div_dd.c: Likewise.
* _div_sd.c: Likewise.
* _div_td.c: Likewise.
* _eq_dd.c: Likewise.
* _eq_sd.c: Likewise.
* _eq_td.c: Likewise.
* _ge_dd.c: Likewise.
* _ge_sd.c: Likewise.
* _ge_td.c: Likewise.
* _gt_dd.c: Likewise.
* _gt_sd.c: Likewise.
* _gt_td.c: Likewise.
* _isinfd128.c: Likewise.
* _isinfd32.c: Likewise.
* _isinfd64.c: Likewise.
* _le_dd.c: Likewise.
* _le_sd.c: Likewise.
* _le_td.c: Likewise.
* _lt_dd.c: Likewise.
* _lt_sd.c: Likewise.
* _lt_td.c: Likewise.
* _mul_dd.c: Likewise.
* _mul_sd.c: Likewise.
* _mul_td.c: Likewise.
* _ne_dd.c: Likewise.
* _ne_sd.c: Likewise.
* _ne_td.c: Likewise.
* _sd_to_dd.c: Likewise.
* _sd_to_df.c: Likewise.
* _sd_to_di.c: Likewise.
* _sd_to_sf.c: Likewise.
* _sd_to_si.c: Likewise.
* _sd_to_td.c: Likewise.
* _sd_to_tf.c: Likewise.
* _sd_to_udi.c: Likewise.
* _sd_to_usi.c: Likewise.
* _sd_to_xf.c: Likewise.
* _sf_to_dd.c: Likewise.
* _sf_to_sd.c: Likewise.
* _sf_to_td.c: Likewise.
* _si_to_dd.c: Likewise.
* _si_to_sd.c: Likewise.
* _si_to_td.c: Likewise.
* _td_to_dd.c: Likewise.
* _td_to_df.c: Likewise.
* _td_to_di.c: Likewise.
* _td_to_sd.c: Likewise.
* _td_to_sf.c: Likewise.
* _td_to_si.c: Likewise.
* _td_to_tf.c: Likewise.
* _td_to_udi.c: Likewise.
* _td_to_usi.c: Likewise.
* _td_to_xf.c: Likewise.
* _tf_to_dd.c: Likewise.
* _tf_to_sd.c: Likewise.
* _tf_to_td.c: Likewise.
* _udi_to_dd.c: Likewise.
* _udi_to_sd.c: Likewise.
* _udi_to_td.c: Likewise.
* _unord_dd.c: Likewise.
* _unord_sd.c: Likewise.
* _unord_td.c: Likewise.
* _usi_to_dd.c: Likewise.
* _usi_to_sd.c: Likewise.
* _usi_to_td.c: Likewise.
* _xf_to_dd.c: Likewise.
* _xf_to_sd.c: Likewise.
* _xf_to_td.c: Likewise.
2007-09-27 H.J. Lu <hongjiu.lu@intel.com>
* b2d.h: Renamed to ...
* bid_b2d.h: This.
* bid128_to_string.c: Renamed to ...
* bid128_string.c: This.
* bid_intrinsics.h: Renamed to ...
* bid_gcc_intrinsics.h: This.
* bid_string.c: Renamed to ...
* bid64_string.c: This.
* binarydecimal.c: Renamed to ...
* bid_decimal_globals.c: This.
* convert_data.c: Renamed to ...
* bid_convert_data.c: This.
* decimal_data.c: Renamed to ...
* bid_decimal_data.c: This.
* decimal_globals.c: Renamed to ...
* bid_decimal_globals.c: This.
* div_macros.h: Renamed to ...
* bid_div_macros.h: This.
* inline_bid_add.h: Renamed to ...
* bid_inline_add.h: This.
* sqrt_macros.h: Renamed to ...
* bid_sqrt_macros.h: This.
2007-07-06 H.J. Lu <hongjiu.lu@intel.com>
Updated from Intel BID library:
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal64
__bid_adddd3 (_Decimal64 x, _Decimal64 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal32
__bid_addsd3 (_Decimal32 x, _Decimal32 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal128
__bid_addtd3 (_Decimal128 x, _Decimal128 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
DFtype
__bid_truncdddf (_Decimal64 x) {
......
......@@ -28,14 +28,16 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
DItype
__bid_fixdddi (_Decimal64 x) {
DItype res;
DItype res = 0xbaddbaddbaddbaddull;
union decimal64 ux;
ux.d = x;
res = __bid64_to_int64_xint (ux.i);
return (res);
}
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal32
__bid_truncddsd2 (_Decimal64 x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
SFtype
__bid_truncddsf (_Decimal64 x) {
......
......@@ -28,14 +28,16 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
SItype
__bid_fixddsi (_Decimal64 x) {
SItype res;
SItype res = 0xbaddbadd;
union decimal64 ux;
ux.d = x;
res = __bid64_to_int32_xint (ux.i);
return (res);
}
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal128
__bid_extendddtd2 (_Decimal64 x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
#if LIBGCC2_HAS_TF_MODE || BID_HAS_TF_MODE
TFtype
......
......@@ -28,14 +28,16 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
UDItype
__bid_fixunsdddi (_Decimal64 x) {
UDItype res;
UDItype res = 0xbaddbaddbaddbaddull;
union decimal64 ux;
ux.d = x;
res = __bid64_to_uint64_xint (ux.i);
if (res == 0x8000000000000000ull) res = 0; // for NaNs too
return (res);
}
......
......@@ -28,14 +28,16 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
USItype
__bid_fixunsddsi (_Decimal64 x) {
USItype res;
USItype res = 0xbaddbadd;
union decimal64 ux;
ux.d = x;
res = __bid64_to_uint32_xint (ux.i);
if (res == 0x80000000) res = 0; // for NaNs too
return (res);
}
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
XFtype
__bid_extendddxf (_Decimal64 x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal64
__bid_extenddfdd (DFtype x) {
......
......@@ -28,10 +28,12 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal32
__bid_truncdfsd (DFtype x) {
union decimal32 res;
res.i = __binary64_to_bid32 (x);
return (res.d);
}
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal128
__bid_extenddftd (DFtype x) {
......
......@@ -28,10 +28,13 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal64
__bid_floatdidd (DItype x) {
union decimal64 res;
res.i = __bid64_from_int64 (x);
return (res.d);
}
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal32
__bid_floatdisd (DItype x) {
......
......@@ -28,10 +28,13 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal128
__bid_floatditd (DItype x) {
union decimal128 res;
res.i = __bid128_from_int64 (x);
return (res.d);
}
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal64
__bid_divdd3 (_Decimal64 x, _Decimal64 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal32
__bid_divsd3 (_Decimal32 x, _Decimal32 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal128
__bid_divtd3 (_Decimal128 x, _Decimal128 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_eqdd2 (_Decimal64 x, _Decimal64 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_eqsd2 (_Decimal32 x, _Decimal32 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_eqtd2 (_Decimal128 x, _Decimal128 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_gedd2 (_Decimal64 x, _Decimal64 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_gesd2 (_Decimal32 x, _Decimal32 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_getd2 (_Decimal128 x, _Decimal128 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_gtdd2 (_Decimal64 x, _Decimal64 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_gtsd2 (_Decimal32 x, _Decimal32 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_gttd2 (_Decimal128 x, _Decimal128 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
int
isinfd128 (_Decimal128 x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
int
isinfd32 (_Decimal32 x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
int
isinfd64 (_Decimal64 x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_ledd2 (_Decimal64 x, _Decimal64 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_lesd2 (_Decimal32 x, _Decimal32 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_letd2 (_Decimal128 x, _Decimal128 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_ltdd2 (_Decimal64 x, _Decimal64 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_ltsd2 (_Decimal32 x, _Decimal32 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_lttd2 (_Decimal128 x, _Decimal128 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal64
__bid_muldd3 (_Decimal64 x, _Decimal64 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal32
__bid_mulsd3 (_Decimal32 x, _Decimal32 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal128
__bid_multd3 (_Decimal128 x, _Decimal128 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_nedd2 (_Decimal64 x, _Decimal64 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_nesd2 (_Decimal32 x, _Decimal32 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_netd2 (_Decimal128 x, _Decimal128 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal64
__bid_extendsddd2 (_Decimal32 x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
DFtype
__bid_extendsddf (_Decimal32 x) {
......
......@@ -28,16 +28,18 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
DItype
__bid_fixsddi (_Decimal32 x) {
DItype res;
DItype res = 0xbaddbaddbaddbaddull;
UINT64 x64;
union decimal32 ux;
ux.d = x;
x64 = __bid32_to_bid64 (ux.i);
res = __bid64_to_int64_xint (x64);
return (res);
}
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
SFtype
__bid_truncsdsf (_Decimal32 x) {
......
......@@ -28,16 +28,18 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
SItype
__bid_fixsdsi (_Decimal32 x) {
SItype res;
SItype res = 0xbaddbadd;
UINT64 x64;
union decimal32 ux;
ux.d = x;
x64 = __bid32_to_bid64 (ux.i);
res = __bid64_to_int32_xint (x64);
return (res);
}
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal128
__bid_extendsdtd2 (_Decimal32 x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
#if LIBGCC2_HAS_TF_MODE || BID_HAS_TF_MODE
TFtype
......
......@@ -28,16 +28,18 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
UDItype
__bid_fixunssddi (_Decimal32 x) {
UDItype res;
UDItype res = 0xbaddbaddbaddbaddull;
UINT64 x64;
union decimal32 ux;
ux.d = x;
x64 = __bid32_to_bid64 (ux.i);
res = __bid64_to_uint64_xint (x64);
if (res == 0x8000000000000000ull) res = 0; // for NaNs too
return (res);
}
......
......@@ -28,16 +28,18 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
USItype
__bid_fixunssdsi (_Decimal32 x) {
USItype res;
USItype res = 0xbaddbadd;
UINT64 x64;
union decimal32 ux;
ux.d = x;
x64 = __bid32_to_bid64 (ux.i);
res = __bid64_to_uint32_xint (x64);
if (res == 0x80000000) res = 0; // for NaNs too
return (res);
}
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
XFtype
__bid_extendsdxf (_Decimal32 x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal64
__bid_extendsfdd (SFtype x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal32
__bid_extendsfsd (SFtype x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal128
__bid_extendsftd (SFtype x) {
......
......@@ -28,10 +28,12 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal64
__bid_floatsidd (SItype x) {
union decimal64 res;
res.i = __bid64_from_int32 (x);
return (res.d);
}
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal32
__bid_floatsisd (SItype x) {
......
......@@ -28,10 +28,12 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal128
__bid_floatsitd (SItype x) {
union decimal128 res;
res.i = __bid128_from_int32 (x);
return (res.d);
}
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal64
__bid_trunctddd2 (_Decimal128 x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
DFtype
__bid_trunctddf (_Decimal128 x) {
......
......@@ -28,14 +28,16 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
DItype
__bid_fixtddi (_Decimal128 x) {
DItype res;
DItype res = 0xbaddbaddbaddbaddull;
union decimal128 ux;
ux.d = x;
res = __bid128_to_int64_xint (ux.i);
return (res);
}
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal32
__bid_trunctdsd2 (_Decimal128 x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
SFtype
__bid_trunctdsf (_Decimal128 x) {
......
......@@ -28,14 +28,16 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
SItype
__bid_fixtdsi (_Decimal128 x) {
SItype res;
union decimal128 ux;
SItype res = 0xbaddbadd;
ux.d = x;
res = __bid128_to_int32_xint (ux.i);
return (res);
}
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
#if LIBGCC2_HAS_TF_MODE || BID_HAS_TF_MODE
TFtype
......
......@@ -28,14 +28,17 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
UDItype
__bid_fixunstddi (_Decimal128 x) {
UDItype res;
UDItype res = 0xbaddbaddbaddbaddull;
union decimal128 ux;
ux.d = x;
res = __bid128_to_uint64_xint (ux.i);
if (res == 0x8000000000000000ull) res = 0; // for NaNs too
return (res);
}
......
......@@ -28,14 +28,16 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
USItype
__bid_fixunstdsi (_Decimal128 x) {
USItype res;
USItype res = 0xbaddbadd;
union decimal128 ux;
ux.d = x;
res = __bid128_to_uint32_xint (ux.i);
if (res == 0x80000000) res = 0; // for NaNs too
return (res);
}
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
XFtype
__bid_trunctdxf (_Decimal128 x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
#if LIBGCC2_HAS_TF_MODE || BID_HAS_TF_MODE
_Decimal64
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
#if LIBGCC2_HAS_TF_MODE || BID_HAS_TF_MODE
_Decimal32
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
#if LIBGCC2_HAS_TF_MODE || BID_HAS_TF_MODE
_Decimal128
......
......@@ -28,10 +28,13 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal64
__bid_floatunsdidd (UDItype x) {
union decimal64 res;
res.i = __bid64_from_uint64 (x);
return (res.d);
}
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal32
__bid_floatunsdisd (UDItype x) {
......
......@@ -28,10 +28,13 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal128
__bid_floatunsditd (UDItype x) {
union decimal128 res;
res.i = __bid128_from_uint64 (x);
return (res.d);
}
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_unorddd2 (_Decimal64 x, _Decimal64 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_unordsd2 (_Decimal32 x, _Decimal32 y) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
CMPtype
__bid_unordtd2 (_Decimal128 x, _Decimal128 y) {
......
......@@ -28,10 +28,13 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal64
__bid_floatunssidd (USItype x) {
union decimal64 res;
res.i = __bid64_from_uint32 (x);
return (res.d);
}
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal32
__bid_floatunssisd (USItype x) {
......
......@@ -28,10 +28,13 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal128
__bid_floatunssitd (USItype x) {
union decimal128 res;
res.i = __bid128_from_uint32 (x);
return (res.d);
}
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal64
__bid_truncxfdd (XFtype x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal32
__bid_truncxfsd (XFtype x) {
......
......@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "bid_conf.h"
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
_Decimal128
__bid_extendxftd (XFtype x) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -26,13 +26,13 @@ along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
extern UINT64 __bid_Twoto60_m_10to18;
extern UINT64 __bid_Twoto60;
extern UINT64 __bid_Inv_Tento9;
extern UINT32 __bid_Twoto30_m_10to9;
extern UINT32 __bid_Tento9;
extern UINT32 __bid_Tento6;
extern UINT32 __bid_Tento3;
extern UINT64 Twoto60_m_10to18;
extern UINT64 Twoto60;
extern UINT64 Inv_Tento9;
extern UINT32 Twoto30_m_10to9;
extern UINT32 Tento9;
extern UINT32 Tento6;
extern UINT32 Tento3;
extern char __bid_midi_tbl[1000][3];
extern UINT64 __bid_mod10_18_tbl[9][128];
extern char midi_tbl[1000][3];
extern UINT64 mod10_18_tbl[9][128];
......@@ -29,8 +29,8 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#define __L0_Normalize_10to18( X_hi, X_lo ) \
{ \
UINT64 L0_tmp; \
L0_tmp = (X_lo) + __bid_Twoto60_m_10to18; \
if (L0_tmp & __bid_Twoto60) \
L0_tmp = (X_lo) + Twoto60_m_10to18; \
if (L0_tmp & Twoto60) \
{(X_hi)=(X_hi)+1;(X_lo)=((L0_tmp<<4)>>4);} \
}
......@@ -38,7 +38,7 @@ if (L0_tmp & __bid_Twoto60) \
#define __L0_Normalize_10to9( X_hi, X_lo ) \
{ \
UINT32 L0_tmp; \
L0_tmp = (X_lo) + __bid_Twoto30_m_10to9; \
L0_tmp = (X_lo) + Twoto30_m_10to9; \
if (L0_tmp & 0x40000000) \
{(X_hi)=(X_hi)+1;(X_lo)=((L0_tmp<<2)>>2);} \
}
......@@ -76,10 +76,10 @@ UINT32 L0_X, L0_head, L0_mid, L0_tail, L0_tmp; \
{ \
UINT32 L1_X_hi, L1_X_lo; \
UINT64 L1_Xhi_64, L1_Xlo_64; \
L1_Xhi_64 = ( ((X)>>28)*__bid_Inv_Tento9 ) >> 33; \
L1_Xlo_64 = (X) - L1_Xhi_64*(UINT64)__bid_Tento9; \
if (L1_Xlo_64 >= (UINT64)__bid_Tento9) \
{L1_Xlo_64-=(UINT64)__bid_Tento9;L1_Xhi_64+=1;} \
L1_Xhi_64 = ( ((X)>>28)*Inv_Tento9 ) >> 33; \
L1_Xlo_64 = (X) - L1_Xhi_64*(UINT64)Tento9; \
if (L1_Xlo_64 >= (UINT64)Tento9) \
{L1_Xlo_64-=(UINT64)Tento9;L1_Xhi_64+=1;} \
L1_X_hi=(UINT32)L1_Xhi_64; L1_X_lo=(UINT32)L1_Xlo_64; \
__L0_Split_MiDi_3(L1_X_hi,(ptr)); \
__L0_Split_MiDi_3(L1_X_lo,(ptr)); \
......@@ -89,18 +89,18 @@ __L0_Split_MiDi_3(L1_X_lo,(ptr)); \
{ \
UINT32 L1_X_hi, L1_X_lo; \
UINT64 L1_Xhi_64, L1_Xlo_64; \
if ((X)>=(UINT64)__bid_Tento9){ \
L1_Xhi_64 = ( ((X)>>28)*__bid_Inv_Tento9 ) >> 33; \
L1_Xlo_64 = (X) - L1_Xhi_64*(UINT64)__bid_Tento9; \
if (L1_Xlo_64 >= (UINT64)__bid_Tento9) \
{L1_Xlo_64-=(UINT64)__bid_Tento9;L1_Xhi_64+=1;} \
if ((X)>=(UINT64)Tento9){ \
L1_Xhi_64 = ( ((X)>>28)*Inv_Tento9 ) >> 33; \
L1_Xlo_64 = (X) - L1_Xhi_64*(UINT64)Tento9; \
if (L1_Xlo_64 >= (UINT64)Tento9) \
{L1_Xlo_64-=(UINT64)Tento9;L1_Xhi_64+=1;} \
L1_X_hi=(UINT32)L1_Xhi_64; \
L1_X_lo=(UINT32)L1_Xlo_64; \
if (L1_X_hi>=__bid_Tento6){ \
if (L1_X_hi>=Tento6){ \
__L0_Split_MiDi_3(L1_X_hi,(ptr)); \
__L0_Split_MiDi_3(L1_X_lo,(ptr)); \
} \
else if (L1_X_hi>=__bid_Tento3){ \
else if (L1_X_hi>=Tento3){ \
__L0_Split_MiDi_2(L1_X_hi,(ptr)); \
__L0_Split_MiDi_3(L1_X_lo,(ptr)); \
} \
......@@ -111,10 +111,10 @@ if ((X)>=(UINT64)__bid_Tento9){ \
} \
else { \
L1_X_lo = (UINT32)(X); \
if (L1_X_lo>=__bid_Tento6){ \
if (L1_X_lo>=Tento6){ \
__L0_Split_MiDi_3(L1_X_lo,(ptr)); \
} \
else if (L1_X_lo>=__bid_Tento3){ \
else if (L1_X_lo>=Tento3){ \
__L0_Split_MiDi_2(L1_X_lo,(ptr)); \
} \
else { \
......@@ -127,7 +127,7 @@ else { \
#define __L0_MiDi2Str( X, c_ptr ) \
{ \
char *L0_src; \
L0_src = __bid_midi_tbl[(X)]; \
L0_src = midi_tbl[(X)]; \
*((c_ptr)++) = *(L0_src++); \
*((c_ptr)++) = *(L0_src++); \
*((c_ptr)++) = *(L0_src); \
......@@ -136,7 +136,7 @@ char *L0_src; \
#define __L0_MiDi2Str_Lead( X, c_ptr ) \
{ \
char *L0_src; \
L0_src = __bid_midi_tbl[(X)]; \
L0_src = midi_tbl[(X)]; \
if ((X)>=100){ \
*((c_ptr)++) = *(L0_src++); \
*((c_ptr)++) = *(L0_src++); \
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -29,33 +29,19 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#define BID_128RES
#include "bid_internal.h"
BID128_FUNCTION_ARG1(__bid128_logb, x)
BID128_FUNCTION_ARG1_NORND_CUSTOMRESTYPE(int, bid128_logb, x)
UINT128 CX, L, res;
UINT64 sign_x, sign_e, logb_sign;
UINT128 CX;
UINT64 sign_x;
SINT64 D;
int_float f64, fx;
int exponent_x, bin_expon_cx, digits;
if (!unpack_BID128_value (&sign_x, &exponent_x, &CX, x)) {
res.w[1] = x.w[1];
res.w[0] = x.w[0];
// x is Infinity?
if ((x.w[1] & 0x7800000000000000ull) == 0x7800000000000000ull) {
if ((x.w[1] & 0x7c00000000000000ull) != 0x7c00000000000000ull)
// +/-Inf, return Inf
res.w[1] = 0x7800000000000000ull;
BID_RETURN (res);
}
// x is 0 otherwise
#ifdef SET_STATUS_FLAGS
// set status flags
__set_status_flags (pfpsf, ZERO_DIVIDE_EXCEPTION);
__set_status_flags (pfpsf, INVALID_EXCEPTION);
#endif
res.w[1] = 0xf800000000000000ull;
res.w[0] = 0;
BID_RETURN (res);
BID_RETURN_VAL (0x80000000);
}
// find number of digits in coefficient
// 2^64
......@@ -63,24 +49,15 @@ BID128_FUNCTION_ARG1(__bid128_logb, x)
// fx ~ CX
fx.d = (float) CX.w[1] * f64.d + (float) CX.w[0];
bin_expon_cx = ((fx.i >> 23) & 0xff) - 0x7f;
digits = __bid_estimate_decimal_digits[bin_expon_cx];
// scale = 38-__bid_estimate_decimal_digits[bin_expon_cx];
D = CX.w[1] - __bid_power10_index_binexp_128[bin_expon_cx].w[1];
if (D > 0
|| (!D && CX.w[0] >= __bid_power10_index_binexp_128[bin_expon_cx].w[0]))
digits = estimate_decimal_digits[bin_expon_cx];
// scale = 38-estimate_decimal_digits[bin_expon_cx];
D = CX.w[1] - power10_index_binexp_128[bin_expon_cx].w[1];
if (D > 0 || (!D && CX.w[0] >= power10_index_binexp_128[bin_expon_cx].w[0])) {
digits++;
}
exponent_x = exponent_x - DECIMAL_EXPONENT_BIAS_128 - 1 + digits;
// extract sign and absolute value from exponent_x
sign_e = ((SINT32) exponent_x) >> 31;
exponent_x = (exponent_x + sign_e) ^ sign_e;
L.w[0] = exponent_x;
L.w[1] = 0;
logb_sign = sign_e << 63;
get_BID128_very_fast (&res, logb_sign, DECIMAL_EXPONENT_BIAS_128, L);
BID_RETURN (res);
BID_RETURN_VAL (exponent_x);
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment