summaryrefslogtreecommitdiff
path: root/gcc/c-cppbuiltin.c
diff options
context:
space:
mode:
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-21 12:53:08 +0000
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-21 12:53:08 +0000
commit8fa7d67baf9bb5d141b7fc16d3257324d9246c21 (patch)
tree93f3471f9ba54489407fddb33fb8858923ba89bc /gcc/c-cppbuiltin.c
parent98b6e5c543bef936296f032d364a37eedfb10fb2 (diff)
downloadgcc-8fa7d67baf9bb5d141b7fc16d3257324d9246c21.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124901 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-cppbuiltin.c')
-rw-r--r--gcc/c-cppbuiltin.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/c-cppbuiltin.c b/gcc/c-cppbuiltin.c
index cc19ce5dd7d..544050a4878 100644
--- a/gcc/c-cppbuiltin.c
+++ b/gcc/c-cppbuiltin.c
@@ -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);
}