diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-04 00:51:02 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-04 00:51:02 +0000 |
commit | 79f66ba126722e5f43309e0f54d6eded4b515416 (patch) | |
tree | 1c6a3803fbcc9266244b35586a585030fb8d2c4e /gcc/sched-vis.c | |
parent | ca78c3fac9ac33371ee52537e40c93ed10c49219 (diff) | |
download | gcc-79f66ba126722e5f43309e0f54d6eded4b515416.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53137 138bc75d-0d04-0410-961f-82ee72b054a4
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: |