aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-09-04 09:24:24 -0700
committerRichard Henderson <rth@gcc.gnu.org>2002-09-04 09:24:24 -0700
commit4b67a2744180ace28c32242b2a19d5e460cb85b3 (patch)
treeb08cf3dd22396dc00c208124fa79e09623e672ab /gcc/config
parent01abf342f82f9db810b16e139fd15986afc75168 (diff)
downloadgcc-4b67a2744180ace28c32242b2a19d5e460cb85b3.zip
gcc-4b67a2744180ace28c32242b2a19d5e460cb85b3.tar.gz
gcc-4b67a2744180ace28c32242b2a19d5e460cb85b3.tar.bz2
real.c (ereal_to_decimal): Add digits parameter.
* real.c (ereal_to_decimal): Add digits parameter. * real.h (REAL_VALUE_TO_DECIMAL): Remove format; add digits parameter. * c-pretty-print.c (pp_c_real_literal): Update call. * print-rtl.c (print_rtx): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * sched-vis.c (print_value): Likewise. * config/arc/arc.c (arc_print_operand): Likewise. * config/c4x/c4x.c (c4x_print_operand): Likewise. * config/i370/i370.h (PRINT_OPERAND): Likewise. * config/i386/i386.c (print_operand): Likewise. * config/i960/i960.c (i960_print_operand): Likewise. * config/ip2k/ip2k.c (asm_output_float): Likewise. * config/m32r/m32r.c (m32r_print_operand): Likewise. * config/m68hc11/m68hc11.c (print_operand): Likewise. * config/m68k/hp320.h (PRINT_OPERAND, ASM_OUTPUT_FLOAT_OPERAND, ASM_OUTPUT_DOUBLE_OPERAND, ASM_OUTPUT_LONG_DOUBLE_OPERAND): Likewise. * config/m68k/m68k.h (ASM_OUTPUT_FLOAT_OPERAND, ASM_OUTPUT_DOUBLE_OPERAND, ASM_OUTPUT_LONG_DOUBLE_OPERAND): Likewise. * config/m68k/sun2o4.h (ASM_OUTPUT_FLOAT_OPERAND, ASM_OUTPUT_DOUBLE_OPERAND): Likewise. * config/m68k/sun3.h (ASM_OUTPUT_FLOAT_OPERAND, ASM_OUTPUT_DOUBLE_OPERAND): Likewise. * config/mips/mips.c (print_operand): Likewise. * config/ns32k/ns32k.c (print_operand): Likewise. * config/pdp11/pdp11.h (PRINT_OPERAND): Likewise. * config/vax/vax.h (PRINT_OPERAND): Likewise. * doc/tm.texi (REAL_VALUE_TO_DECIMAL): Update docs. * f/target.h (ffetarget_print_real1, ffetarget_print_real2): Update call to REAL_VALUE_TO_DECIMAL. From-SVN: r56798
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/arc/arc.c2
-rw-r--r--gcc/config/c4x/c4x.c2
-rw-r--r--gcc/config/i370/i370.h4
-rw-r--r--gcc/config/i386/i386.c4
-rw-r--r--gcc/config/i960/i960.c2
-rw-r--r--gcc/config/ip2k/ip2k.c2
-rw-r--r--gcc/config/m32r/m32r.c2
-rw-r--r--gcc/config/m68hc11/m68hc11.c2
-rw-r--r--gcc/config/m68k/hp320.h10
-rw-r--r--gcc/config/m68k/m68k.h6
-rw-r--r--gcc/config/m68k/sun2o4.h4
-rw-r--r--gcc/config/m68k/sun3.h4
-rw-r--r--gcc/config/mips/mips.c2
-rw-r--r--gcc/config/ns32k/ns32k.c4
-rw-r--r--gcc/config/pdp11/pdp11.h2
-rw-r--r--gcc/config/vax/vax.h4
16 files changed, 28 insertions, 28 deletions
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 426cc89..a8de317 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -1748,7 +1748,7 @@ arc_print_operand (file, x, code)
|| GET_MODE_CLASS (GET_MODE (x)) != MODE_FLOAT)
abort ();
REAL_VALUE_FROM_CONST_DOUBLE (d, x);
- REAL_VALUE_TO_DECIMAL (d, "%.20e", str);
+ REAL_VALUE_TO_DECIMAL (d, str, -1);
fprintf (file, "%s", str);
return;
}
diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c
index 2ed42be..7909665 100644
--- a/gcc/config/c4x/c4x.c
+++ b/gcc/config/c4x/c4x.c
@@ -1958,7 +1958,7 @@ c4x_print_operand (file, op, letter)
REAL_VALUE_TYPE r;
REAL_VALUE_FROM_CONST_DOUBLE (r, op);
- REAL_VALUE_TO_DECIMAL (r, "%20f", str);
+ REAL_VALUE_TO_DECIMAL (r, str, -1);
fprintf (file, "%s", str);
}
break;
diff --git a/gcc/config/i370/i370.h b/gcc/config/i370/i370.h
index 7bcbdf8..d4c2939 100644
--- a/gcc/config/i370/i370.h
+++ b/gcc/config/i370/i370.h
@@ -1371,7 +1371,7 @@ enum reg_class
char buf[50]; \
REAL_VALUE_TYPE rval; \
REAL_VALUE_FROM_CONST_DOUBLE(rval, XV); \
- REAL_VALUE_TO_DECIMAL (rval, HOST_WIDE_INT_PRINT_DEC, buf); \
+ REAL_VALUE_TO_DECIMAL (rval, buf, -1); \
if (GET_MODE (XV) == SFmode) \
{ \
mvs_page_lit += 4; \
@@ -1665,7 +1665,7 @@ enum reg_class
char buf[50]; \
REAL_VALUE_TYPE rval; \
REAL_VALUE_FROM_CONST_DOUBLE(rval, XV); \
- REAL_VALUE_TO_DECIMAL (rval, HOST_WIDE_INT_PRINT_DEC, buf); \
+ REAL_VALUE_TO_DECIMAL (rval, buf, -1); \
if (GET_MODE (XV) == SFmode) \
{ \
mvs_page_lit += 4; \
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 730bd3d..4e0da60 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -6610,7 +6610,7 @@ print_operand (file, x, code)
char dstr[30];
REAL_VALUE_FROM_CONST_DOUBLE (r, x);
- REAL_VALUE_TO_DECIMAL (r, "%.22e", dstr);
+ REAL_VALUE_TO_DECIMAL (r, dstr, -1);
fprintf (file, "%s", dstr);
}
@@ -6621,7 +6621,7 @@ print_operand (file, x, code)
char dstr[30];
REAL_VALUE_FROM_CONST_DOUBLE (r, x);
- REAL_VALUE_TO_DECIMAL (r, "%.22e", dstr);
+ REAL_VALUE_TO_DECIMAL (r, dstr, -1);
fprintf (file, "%s", dstr);
}
diff --git a/gcc/config/i960/i960.c b/gcc/config/i960/i960.c
index 6aec8c5..ae85711 100644
--- a/gcc/config/i960/i960.c
+++ b/gcc/config/i960/i960.c
@@ -1761,7 +1761,7 @@ i960_print_operand (file, x, code)
}
REAL_VALUE_FROM_CONST_DOUBLE (d, x);
- REAL_VALUE_TO_DECIMAL (d, "%#g", dstr);
+ REAL_VALUE_TO_DECIMAL (d, dstr, -1);
fprintf (file, "0f%s", dstr);
return;
}
diff --git a/gcc/config/ip2k/ip2k.c b/gcc/config/ip2k/ip2k.c
index bcbed3f..f4c9daf 100644
--- a/gcc/config/ip2k/ip2k.c
+++ b/gcc/config/ip2k/ip2k.c
@@ -3058,7 +3058,7 @@ asm_output_float (file, n)
char dstr[100];
REAL_VALUE_TO_TARGET_SINGLE (n, val);
- REAL_VALUE_TO_DECIMAL (n, "%g", dstr);
+ REAL_VALUE_TO_DECIMAL (n, dstr, -1);
fprintf (file, "\t.long 0x%08lx\t/* %s */\n",val, dstr);
}
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index c481431..0909917 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -2318,7 +2318,7 @@ m32r_print_operand (file, x, code)
|| GET_MODE_CLASS (GET_MODE (x)) != MODE_FLOAT)
fatal_insn ("bad insn for 'A'", x);
REAL_VALUE_FROM_CONST_DOUBLE (d, x);
- REAL_VALUE_TO_DECIMAL (d, "%.20e", str);
+ REAL_VALUE_TO_DECIMAL (d, str, -1);
fprintf (file, "%s", str);
return;
}
diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c
index 169381f..c17c3f1 100644
--- a/gcc/config/m68hc11/m68hc11.c
+++ b/gcc/config/m68hc11/m68hc11.c
@@ -2264,7 +2264,7 @@ print_operand (file, op, letter)
char dstr[30];
REAL_VALUE_FROM_CONST_DOUBLE (r, op);
- REAL_VALUE_TO_DECIMAL (r, "%.20g", dstr);
+ REAL_VALUE_TO_DECIMAL (r, dstr, -1);
asm_fprintf (file, "%I0r%s", dstr);
}
else
diff --git a/gcc/config/m68k/hp320.h b/gcc/config/m68k/hp320.h
index 7a18c52..17dcb69 100644
--- a/gcc/config/m68k/hp320.h
+++ b/gcc/config/m68k/hp320.h
@@ -300,7 +300,7 @@ do { \
if (CODE == 'f') \
{ \
char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr); \
+ REAL_VALUE_TO_DECIMAL (VALUE, dstr, 9); \
fprintf ((FILE), "&0f%s", dstr); \
} \
else \
@@ -317,7 +317,7 @@ do { \
#undef ASM_OUTPUT_DOUBLE_OPERAND
#define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
+ REAL_VALUE_TO_DECIMAL (VALUE, dstr, -1); \
fprintf (FILE, "&0f%s", dstr); \
} while (0)
@@ -326,7 +326,7 @@ do { \
#undef ASM_OUTPUT_LONG_DOUBLE_OPERAND
#define ASM_OUTPUT_LONG_DOUBLE_OPERAND(FILE,VALUE) \
do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
+ REAL_VALUE_TO_DECIMAL (VALUE, dstr, -1); \
fprintf (FILE, "&0f%s", dstr); \
} while (0)
@@ -354,12 +354,12 @@ do { \
else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode) \
{ REAL_VALUE_TYPE r; char dstr[30]; \
REAL_VALUE_FROM_CONST_DOUBLE (r, X); \
- REAL_VALUE_TO_DECIMAL (r, "%.20g", dstr); \
+ REAL_VALUE_TO_DECIMAL (r, dstr, -1); \
fprintf (FILE, "&0f%s", dstr); } \
else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == XFmode) \
{ REAL_VALUE_TYPE r; char dstr[30]; \
REAL_VALUE_FROM_CONST_DOUBLE (r, X); \
- REAL_VALUE_TO_DECIMAL (r, "%.20g", dstr); \
+ REAL_VALUE_TO_DECIMAL (r, dstr, -1); \
fprintf (FILE, "&0f%s", dstr); } \
else { putc ('&', FILE); output_addr_const (FILE, X); }}
#endif
diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h
index d04b1ad..bf70352 100644
--- a/gcc/config/m68k/m68k.h
+++ b/gcc/config/m68k/m68k.h
@@ -1831,7 +1831,7 @@ __transfer_from_trampoline () \
if (CODE == 'f') \
{ \
char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr); \
+ REAL_VALUE_TO_DECIMAL (VALUE, dstr, 9); \
asm_fprintf ((FILE), "%I0r%s", dstr); \
} \
else \
@@ -1846,7 +1846,7 @@ __transfer_from_trampoline () \
This macro is a 68k-specific macro. */
#define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
+ REAL_VALUE_TO_DECIMAL (VALUE, dstr, -1); \
asm_fprintf (FILE, "%I0r%s", dstr); \
} while (0)
@@ -1854,7 +1854,7 @@ __transfer_from_trampoline () \
generated by m68k.md. */
#define ASM_OUTPUT_LONG_DOUBLE_OPERAND(FILE,VALUE) \
do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
+ REAL_VALUE_TO_DECIMAL (VALUE, dstr, -1); \
asm_fprintf (FILE, "%I0r%s", dstr); \
} while (0)
diff --git a/gcc/config/m68k/sun2o4.h b/gcc/config/m68k/sun2o4.h
index b3564c2..5b09262 100644
--- a/gcc/config/m68k/sun2o4.h
+++ b/gcc/config/m68k/sun2o4.h
@@ -121,7 +121,7 @@ Boston, MA 02111-1307, USA. */
} \
else \
{ char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \
+ REAL_VALUE_TO_DECIMAL ((VALUE), dstr, 9); \
fprintf (FILE, "#0r%s", dstr); \
} \
} while (0)
@@ -141,7 +141,7 @@ Boston, MA 02111-1307, USA. */
} \
else \
{ char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr); \
+ REAL_VALUE_TO_DECIMAL ((VALUE), dstr, -1); \
fprintf (FILE, "#0r%s", dstr); \
} \
} while (0)
diff --git a/gcc/config/m68k/sun3.h b/gcc/config/m68k/sun3.h
index e3749ee..3dcb85a 100644
--- a/gcc/config/m68k/sun3.h
+++ b/gcc/config/m68k/sun3.h
@@ -208,7 +208,7 @@ Boston, MA 02111-1307, USA. */
} \
else \
{ char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \
+ REAL_VALUE_TO_DECIMAL ((VALUE), dstr, 9); \
asm_fprintf (FILE, "%I0r%s", dstr); \
} \
} while (0)
@@ -228,7 +228,7 @@ Boston, MA 02111-1307, USA. */
} \
else \
{ char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.17g", dstr); \
+ REAL_VALUE_TO_DECIMAL ((VALUE), dstr, -1); \
asm_fprintf (FILE, "%I0r%s", dstr); \
} \
} while (0)
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index f67c545..2044cbf 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -5888,7 +5888,7 @@ print_operand (file, op, letter)
char s[30];
REAL_VALUE_FROM_CONST_DOUBLE (d, op);
- REAL_VALUE_TO_DECIMAL (d, "%.20e", s);
+ REAL_VALUE_TO_DECIMAL (d, s, -1);
fprintf (file, s);
}
diff --git a/gcc/config/ns32k/ns32k.c b/gcc/config/ns32k/ns32k.c
index 5c5252c..b94e704 100644
--- a/gcc/config/ns32k/ns32k.c
+++ b/gcc/config/ns32k/ns32k.c
@@ -1134,7 +1134,7 @@ print_operand (file, x, code)
CONST_DOUBLE_HIGH (x), CONST_DOUBLE_LOW (x));
#else
char s[30];
- REAL_VALUE_TO_DECIMAL (r, "%.20e", s);
+ REAL_VALUE_TO_DECIMAL (r, s, -1);
#ifdef ENCORE_ASM
fprintf (file, "0f%s", s);
#else
@@ -1150,7 +1150,7 @@ print_operand (file, x, code)
fprintf (file, "0Fx%08lx", l);
#else
char s[30];
- REAL_VALUE_TO_DECIMAL (r, "%.20e", s);
+ REAL_VALUE_TO_DECIMAL (r, s, -1);
fprintf (file, "0f%s", s);
#endif
}
diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h
index 1223078..f4e40b3 100644
--- a/gcc/config/pdp11/pdp11.h
+++ b/gcc/config/pdp11/pdp11.h
@@ -1128,7 +1128,7 @@ fprintf (FILE, "$help$: . = .+8 ; space for tmp moves!\n") \
{ REAL_VALUE_TYPE r; \
char buf[30]; \
REAL_VALUE_FROM_CONST_DOUBLE (r, X); \
- REAL_VALUE_TO_DECIMAL (r, "%.20e", buf); \
+ REAL_VALUE_TO_DECIMAL (r, buf, -1); \
fprintf (FILE, "#%s", buf); } \
else { putc ('$', FILE); output_addr_const_pdp11 (FILE, X); }}
diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h
index 702125d..3d97678 100644
--- a/gcc/config/vax/vax.h
+++ b/gcc/config/vax/vax.h
@@ -1207,12 +1207,12 @@ VAX operand formatting codes:
else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == SFmode) \
{ REAL_VALUE_TYPE r; char dstr[30]; \
REAL_VALUE_FROM_CONST_DOUBLE (r, X); \
- REAL_VALUE_TO_DECIMAL (r, "%.20e", dstr); \
+ REAL_VALUE_TO_DECIMAL (r, dstr, -1); \
fprintf (FILE, "$0f%s", dstr); } \
else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode) \
{ REAL_VALUE_TYPE r; char dstr[30]; \
REAL_VALUE_FROM_CONST_DOUBLE (r, X); \
- REAL_VALUE_TO_DECIMAL (r, "%.20e", dstr); \
+ REAL_VALUE_TO_DECIMAL (r, dstr, -1); \
fprintf (FILE, "$0%c%s", ASM_DOUBLE_CHAR, dstr); } \
else { putc ('$', FILE); output_addr_const (FILE, X); }}