Commit 4d8a8a0a by Andreas Krebbel Committed by Andreas Krebbel

defaults.h (IBM_FLOAT_FORMAT): Macro definition removed.

2007-05-21  Andreas Krebbel  <krebbel1@de.ibm.com>

	* defaults.h (IBM_FLOAT_FORMAT): Macro definition removed.
	* doc/tm.texi (IBM_FLOAT_FORMAT): Documentation entry removed.
	* real.c (encode_i370_single, decode_i370_single,
	encode_i370_double, decode_i370_double): Functions removed.
	(i370_single_format, i370_double_format): Initializations removed.
	(real_maxval, round_for_format, exact_real_truncate, significand_size):
	Consider the log2_b field to always be one.
	(ieee_single_format, mips_single_format, coldfire_single_format,
	ieee_double_format, mips_double_format,	coldfire_double_format,
	ieee_extended_motorola_format, ieee_extended_intel_96_format,
	ieee_extended_intel_128_format, ieee_extended_intel_96_round_53_format,
	ibm_extended_format, mips_extended_format, ieee_quad_format,
	mips_quad_format, vax_f_format, vax_d_format, vax_g_format,
	decimal_single_format, decimal_double_format, decimal_quad_format,
	c4x_single_format, c4x_extended_format, real_internal_format): Remove
	initialization of log2_b.
	* real.h (i370_single_format, i370_double_format): Declarations removed.
	* c-cppbuiltin.c (builtin_define_float_constants): Consider the log2_b
	field to always be one.

From-SVN: r124901
parent 740aeb38
2007-05-21 Andreas Krebbel <krebbel1@de.ibm.com>
* defaults.h (IBM_FLOAT_FORMAT): Macro definition removed.
* doc/tm.texi (IBM_FLOAT_FORMAT): Documentation entry removed.
* real.c (encode_i370_single, decode_i370_single,
encode_i370_double, decode_i370_double): Functions removed.
(i370_single_format, i370_double_format): Initializations removed.
(real_maxval, round_for_format, exact_real_truncate, significand_size):
Consider the log2_b field to always be one.
(ieee_single_format, mips_single_format, coldfire_single_format,
ieee_double_format, mips_double_format, coldfire_double_format,
ieee_extended_motorola_format, ieee_extended_intel_96_format,
ieee_extended_intel_128_format, ieee_extended_intel_96_round_53_format,
ibm_extended_format, mips_extended_format, ieee_quad_format,
mips_quad_format, vax_f_format, vax_d_format, vax_g_format,
decimal_single_format, decimal_double_format, decimal_quad_format,
c4x_single_format, c4x_extended_format, real_internal_format): Remove
initialization of log2_b.
* real.h (i370_single_format, i370_double_format): Declarations removed.
* c-cppbuiltin.c (builtin_define_float_constants): Consider the log2_b
field to always be one.
2007-05-21 Andreas Schwab <schwab@suse.de>
* config/ia64/ia64.c (emit_predicate_relation_info): Fix use of
......
......@@ -111,7 +111,7 @@ builtin_define_float_constants (const char *name_prefix,
/* The radix of the exponent representation. */
if (type == float_type_node)
builtin_define_with_int_value ("__FLT_RADIX__", fmt->b);
log10_b = log10_2 * fmt->log2_b;
log10_b = log10_2;
/* The number of radix digits, p, in the floating-point significand. */
sprintf (name, "__%s_MANT_DIG__", name_prefix);
......@@ -208,12 +208,12 @@ builtin_define_float_constants (const char *name_prefix,
char *p;
strcpy (buf, "0x0.");
n = fmt->p * fmt->log2_b;
n = fmt->p;
for (i = 0, p = buf + 4; i + 3 < n; i += 4)
*p++ = 'f';
if (i < n)
*p++ = "08ce"[n - i];
sprintf (p, "p%d", fmt->emax * fmt->log2_b);
sprintf (p, "p%d", fmt->emax);
if (fmt->pnan < fmt->p)
{
/* This is an IBM extended double format made up of two IEEE
......@@ -231,7 +231,7 @@ builtin_define_float_constants (const char *name_prefix,
/* The minimum normalized positive floating-point number,
b**(emin-1). */
sprintf (name, "__%s_MIN__", name_prefix);
sprintf (buf, "0x1p%d", (fmt->emin - 1) * fmt->log2_b);
sprintf (buf, "0x1p%d", fmt->emin - 1);
builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix, fp_cast);
/* The difference between 1 and the least value greater than 1 that is
......@@ -240,9 +240,9 @@ builtin_define_float_constants (const char *name_prefix,
if (fmt->pnan < fmt->p)
/* This is an IBM extended double format, so 1.0 + any double is
representable precisely. */
sprintf (buf, "0x1p%d", (fmt->emin - fmt->p) * fmt->log2_b);
sprintf (buf, "0x1p%d", fmt->emin - fmt->p);
else
sprintf (buf, "0x1p%d", (1 - fmt->p) * fmt->log2_b);
sprintf (buf, "0x1p%d", 1 - fmt->p);
builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix, fp_cast);
/* For C++ std::numeric_limits<T>::denorm_min. The minimum denormalized
......@@ -251,7 +251,7 @@ builtin_define_float_constants (const char *name_prefix,
sprintf (name, "__%s_DENORM_MIN__", name_prefix);
if (fmt->has_denorm)
{
sprintf (buf, "0x1p%d", (fmt->emin - fmt->p) * fmt->log2_b);
sprintf (buf, "0x1p%d", fmt->emin - fmt->p);
builtin_define_with_hex_fp_value (name, type, decimal_dig,
buf, fp_suffix, fp_cast);
}
......
......@@ -623,8 +623,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#define UNKNOWN_FLOAT_FORMAT 0
#define IEEE_FLOAT_FORMAT 1
#define VAX_FLOAT_FORMAT 2
#define IBM_FLOAT_FORMAT 3
#define C4X_FLOAT_FORMAT 4
#define C4X_FLOAT_FORMAT 3
/* Default to IEEE float if not specified. Nearly all machines use it. */
#ifndef TARGET_FLOAT_FORMAT
......
......@@ -1340,9 +1340,6 @@ need to define @code{TARGET_FLOAT_FORMAT} when the format is IEEE@.
This code indicates the ``F float'' (for @code{float}) and ``D float''
or ``G float'' formats (for @code{double}) used on the VAX and PDP-11@.
@item IBM_FLOAT_FORMAT
This code indicates the format used on the IBM System/370.
@item C4X_FLOAT_FORMAT
This code indicates the format used on the TMS320C3x/C4x.
@end ftable
......
......@@ -126,9 +126,6 @@ struct real_format
/* The radix of the exponent and digits of the significand. */
int b;
/* log2(b). */
int log2_b;
/* Size of the significand in digits of radix B. */
int p;
......@@ -272,8 +269,6 @@ extern const struct real_format mips_quad_format;
extern const struct real_format vax_f_format;
extern const struct real_format vax_d_format;
extern const struct real_format vax_g_format;
extern const struct real_format i370_single_format;
extern const struct real_format i370_double_format;
extern const struct real_format c4x_single_format;
extern const struct real_format c4x_extended_format;
extern const struct real_format real_internal_format;
......
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