aboutsummaryrefslogtreecommitdiff
path: root/gcc/print-rtl.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1998-07-06 15:40:02 -0700
committerJeff Law <law@gcc.gnu.org>1998-07-06 16:40:02 -0600
commit800d5c9e172776de4ad5875559d83049263005a2 (patch)
treeef4e4031500c7bf6540c60822a29018f4e226818 /gcc/print-rtl.c
parent4051959be99ddba084673788892d3e26bac13621 (diff)
downloadgcc-800d5c9e172776de4ad5875559d83049263005a2.zip
gcc-800d5c9e172776de4ad5875559d83049263005a2.tar.gz
gcc-800d5c9e172776de4ad5875559d83049263005a2.tar.bz2
print-rtl.c (print_rtx): Display the real-value equivalent of a const_double when easy.
* 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. From-SVN: r20972
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 ef25e7e..893c001 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;
}