A type confusion leads to illegal (and nonsensical) assembly on certain host
architectures (e.g. ARM), where HOST_WIDE_INT (64 bit) and unsigned long (32
bit) have different alignments. So this has printed an uninitialized
register instead of the intended value. This fixes float constant
initialization on an ARM->Microblaze cross compiler.

--- a/gcc/config/microblaze/microblaze.c
+++ b/gcc/config/microblaze/microblaze.c
@@ -2468,7 +2468,7 @@ print_operand (FILE * file, rtx op, int letter)
          unsigned long value_long;
          REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op),
                                       value_long);
-         fprintf (file, HOST_WIDE_INT_PRINT_HEX, value_long);
+         fprintf (file, "%#lx", value_long);
        }
       else
        {

Reply via email to