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
This commit is contained in:
parent
8f39865a3c
commit
b3ae1ccd98
|
@ -1,3 +1,10 @@
|
|||
2002-05-03 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2002-05-03 David S. Miller <davem@redhat.com>
|
||||
|
||||
* haifa-sched.c (rank_for_schedule): Revert 2002-05-02 change,
|
||||
|
|
|
@ -1599,7 +1599,7 @@ sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \
|
|||
$(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H)
|
||||
sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) sched-int.h \
|
||||
hard-reg-set.h $(BASIC_BLOCK_H) $(INSN_ATTR_H) $(REGS_H) $(TM_P_H) \
|
||||
$(TARGET_H)
|
||||
$(TARGET_H) real.h
|
||||
final.o : final.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h intl.h \
|
||||
$(REGS_H) $(RECOG_H) conditions.h insn-config.h $(INSN_ATTR_H) function.h \
|
||||
real.h output.h hard-reg-set.h except.h debug.h xcoffout.h \
|
||||
|
|
|
@ -5004,12 +5004,9 @@ etoasc (x, string, ndigs)
|
|||
}
|
||||
}
|
||||
doexp:
|
||||
/*
|
||||
if (expon >= 0)
|
||||
sprintf (ss, "e+%d", expon);
|
||||
else
|
||||
sprintf (ss, "e%d", expon);
|
||||
*/
|
||||
/* Strip trailing zeros, but leave at least one. */
|
||||
while (ss[-1] == '0' && ss[-2] != '.')
|
||||
--ss;
|
||||
sprintf (ss, "e%d", expon);
|
||||
bxit:
|
||||
rndprc = rndsav;
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue