summaryrefslogtreecommitdiff
path: root/gcc/print-rtl.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-07-06 22:40:02 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-07-06 22:40:02 +0000
commit56609c6ccc3b5f083417112530208a7913ad11e7 (patch)
treeef4e4031500c7bf6540c60822a29018f4e226818 /gcc/print-rtl.c
parent257b057adfa86b4bdbb3f7a538baef9fcd75cd2c (diff)
downloadgcc-56609c6ccc3b5f083417112530208a7913ad11e7.tar.gz
* print-rtl.c (print_rtx): Display the real-value equivalent of
a const_double when easy. * real.h (REAL_VALUE_TO_TARGET_SINGLE): Use a union to pun types. Zero memory first for predictability. (REAL_VALUE_TO_TARGET_DOUBLE): Likewise. * varasm.c (immed_real_const_1): Notice width of H_W_I == double. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20972 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/print-rtl.c')
-rw-r--r--gcc/print-rtl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index ef25e7e6ebe..893c0018b58 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -23,6 +23,7 @@ Boston, MA 02111-1307, USA. */
#include "system.h"
#include "rtl.h"
#include "bitmap.h"
+#include "real.h"
/* How to print out a register name.
@@ -268,6 +269,15 @@ print_rtx (in_rtx)
abort ();
}
+#if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
+ if (GET_CODE (in_rtx) == CONST_DOUBLE && FLOAT_MODE_P (GET_MODE (in_rtx)))
+ {
+ double val;
+ REAL_VALUE_FROM_CONST_DOUBLE (val, in_rtx);
+ fprintf (outfile, " [%.16g]", val);
+ }
+#endif
+
fprintf (outfile, ")");
sawclose = 1;
}