aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@acm.org>2007-05-09 17:05:14 +0000
committerBob Wilson <bwilson@gcc.gnu.org>2007-05-09 17:05:14 +0000
commit74ed13f5c63b69be28d9646bc08040473077bccb (patch)
tree97bcbcddf8b42d466de62857c000c48bccd08122
parent520c62adcda2977418be8c7163d413549f5e7e3d (diff)
downloadgcc-74ed13f5c63b69be28d9646bc08040473077bccb.zip
gcc-74ed13f5c63b69be28d9646bc08040473077bccb.tar.gz
gcc-74ed13f5c63b69be28d9646bc08040473077bccb.tar.bz2
xtensa.c (xtensa_output_literal): Mask out high bits for floating-point values if HOST_BITS_PER_LONG > 32.
* 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: r124578
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/xtensa/xtensa.c13
2 files changed, 17 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a5b1469..36211dc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2007-05-09 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-05-08 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.h (LOCAL_ALIGNMENT): Define.
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 43bcc58..81e7797 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -1939,6 +1939,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);
@@ -1952,11 +1953,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;
+#endif
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;
+#endif
fprintf (file, "0x%08lx, 0x%08lx\n",
value_long[0], value_long[1]);
break;
@@ -1978,9 +1986,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;