diff options
author | Richard Henderson <rth@redhat.com> | 2002-05-03 17:51:02 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-05-03 17:51:02 -0700 |
commit | b3ae1ccd98a86f1a3b63cf1294d7b7effb3f9fa9 (patch) | |
tree | 1c6a3803fbcc9266244b35586a585030fb8d2c4e /gcc/sched-vis.c | |
parent | 8f39865a3c995f73b925d243f78b85e293820cee (diff) |
real.c (etoasc): Strip most trailing zeros for clarity.
* real.c (etoasc): Strip most trailing zeros for clarity.
* sched-vis.c: Include real.h.
(print_value): Use REAL_VALUE_TO_DECIMAL as needed.
* Makefile.in (sched-vis.o): Add real.h.
From-SVN: r53137
Diffstat (limited to 'gcc/sched-vis.c')
-rw-r--r-- | gcc/sched-vis.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/sched-vis.c b/gcc/sched-vis.c index 48b68542edc..e49d4bfeb1b 100644 --- a/gcc/sched-vis.c +++ b/gcc/sched-vis.c @@ -30,6 +30,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "hard-reg-set.h" #include "basic-block.h" #include "insn-attr.h" +#include "real.h" #include "sched-int.h" #include "target.h" @@ -560,7 +561,15 @@ print_value (buf, x, verbose) cur = safe_concat (buf, cur, t); break; case CONST_DOUBLE: - sprintf (t, "<0x%lx,0x%lx>", (long) XWINT (x, 2), (long) XWINT (x, 3)); + if (FLOAT_MODE_P (GET_MODE (x))) + { + REAL_VALUE_TYPE r; + + REAL_VALUE_FROM_CONST_DOUBLE (r, x); + REAL_VALUE_TO_DECIMAL(r, "%.6e", t); + } + else + sprintf (t, "<0x%lx,0x%lx>", (long) XWINT (x, 2), (long) XWINT (x, 3)); cur = safe_concat (buf, cur, t); break; case CONST_STRING: |