This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[arm] Fix rtl-checking failure in arm_print_value


Noticed while debugging the arm bootstrap failure.

Tested on arm-linux-gnueabihf.  OK to install?

Richard


2019-10-03  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* config/arm/arm.c (arm_print_value): Use real_to_decimal
	to print CONST_DOUBLEs.

Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c	2019-09-19 10:04:17.889997155 +0100
+++ gcc/config/arm/arm.c	2019-10-03 13:43:41.618712286 +0100
@@ -16122,7 +16122,12 @@ arm_print_value (FILE *f, rtx x)
       return;
 
     case CONST_DOUBLE:
-      fprintf (f, "<0x%lx,0x%lx>", (long)XWINT (x, 2), (long)XWINT (x, 3));
+      {
+	char fpstr[20];
+	real_to_decimal (fpstr, CONST_DOUBLE_REAL_VALUE (x),
+			 sizeof (fpstr), 0, 1);
+	fputs (fpstr, f);
+      }
       return;
 
     case CONST_VECTOR:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]