]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
xtensa.c (xtensa_output_literal): Mask out high bits for floating-point values if...
authorBob Wilson <bob.wilson@acm.org>
Mon, 10 Sep 2007 21:41:50 +0000 (21:41 +0000)
committerBob Wilson <bwilson@gcc.gnu.org>
Mon, 10 Sep 2007 21:41:50 +0000 (21:41 +0000)
* config/xtensa/xtensa.c (xtensa_output_literal): Mask out high bits
for floating-point values if HOST_BITS_PER_LONG > 32.  Use
split_double instead of operand_subword.

From-SVN: r128352

gcc/ChangeLog
gcc/config/xtensa/xtensa.c

index ad713ca67bcf1bf3006b8000248487d9dbf39fc9..d1a90998f3c7d0ad07d6be463c5e391b7deff6e3 100644 (file)
@@ -1,3 +1,9 @@
+2007-09-10  Bob Wilson  <bob.wilson@acm.org>
+       
+       * config/xtensa/xtensa.c (xtensa_output_literal): Mask out high bits
+       for floating-point values if HOST_BITS_PER_LONG > 32.  Use
+       split_double instead of operand_subword.
+       
 2007-09-10  Bob Wilson  <bob.wilson@acm.org>
 
        * config/xtensa/xtensa.md (adddi3, adddi_carry): Delete.
index 3d0471ea628ba5fd4dfc9210c5a0df922e927beb..5e94948edbc66dd8014002cb72450f624ef30414 100644 (file)
@@ -1844,6 +1844,7 @@ xtensa_output_literal (FILE *file, rtx x, enum machine_mode mode, int labelno)
   long value_long[2];
   REAL_VALUE_TYPE r;
   int size;
+  rtx first, second;
 
   fprintf (file, "\t.literal .LC%u, ", (unsigned) labelno);
 
@@ -1857,11 +1858,18 @@ xtensa_output_literal (FILE *file, rtx x, enum machine_mode mode, int labelno)
        {
        case SFmode:
          REAL_VALUE_TO_TARGET_SINGLE (r, value_long[0]);
+         if (HOST_BITS_PER_LONG > 32)
+           value_long[0] &= 0xffffffff;
          fprintf (file, "0x%08lx\n", value_long[0]);
          break;
 
        case DFmode:
          REAL_VALUE_TO_TARGET_DOUBLE (r, value_long);
+         if (HOST_BITS_PER_LONG > 32)
+           {
+             value_long[0] &= 0xffffffff;
+             value_long[1] &= 0xffffffff;
+           }
          fprintf (file, "0x%08lx, 0x%08lx\n",
                   value_long[0], value_long[1]);
          break;
@@ -1883,9 +1891,10 @@ xtensa_output_literal (FILE *file, rtx x, enum machine_mode mode, int labelno)
          break;
 
        case 8:
-         output_addr_const (file, operand_subword (x, 0, 0, DImode));
+         split_double (x, &first, &second);
+         output_addr_const (file, first);
          fputs (", ", file);
-         output_addr_const (file, operand_subword (x, 1, 0, DImode));
+         output_addr_const (file, second);
          fputs ("\n", file);
          break;