*** empty log message ***
authorRichard Stallman <rms@gnu.org>
Wed, 1 Apr 1992 08:03:10 +0000 (08:03 +0000)
committerRichard Stallman <rms@gnu.org>
Wed, 1 Apr 1992 08:03:10 +0000 (08:03 +0000)
From-SVN: r657

gcc/emit-rtl.c

index 6a9d6d599be3e8c8a23f538d846c795174c32083..82160f54cd1d0428ba18329f4a904f5a62c614f7 100644 (file)
@@ -696,7 +696,15 @@ operand_subword (op, i, validate_address, mode)
       && GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
       && GET_CODE (op) == CONST_DOUBLE)
     return gen_rtx (CONST_INT, VOIDmode,
-                   i ? CONST_DOUBLE_HIGH (op) : CONST_DOUBLE_LOW (op));
+                   i ^ (WORDS_BIG_ENDIAN !=
+/* The constant is stored in the host's word-ordering,
+   but we want to access it in the target's word-ordering.  */
+#ifdef HOST_WORDS_BIG_ENDIAN
+                        1
+#else
+                        0
+#endif
+                        ) ? CONST_DOUBLE_HIGH (op) : CONST_DOUBLE_LOW (op));
 
   /* Single word float is a little harder, since single- and double-word
      values often do not have the same high-order bits.  We have already