(reload_cse_regno_equal_p): Check for value using more than one
authorRichard Kenner <kenner@gcc.gnu.org>
Sun, 18 May 1997 12:50:22 +0000 (08:50 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Sun, 18 May 1997 12:50:22 +0000 (08:50 -0400)
register on a big endian machine.

From-SVN: r14088

gcc/reload1.c

index 199ae685d89c6bc08994c17864739f83fdcc23cf..62ac6d71d1faf2eed21412f713f3f2f695b713e2 100644 (file)
@@ -7980,6 +7980,14 @@ reload_cse_regno_equal_p (regno, val, mode)
        && (GET_CODE (val) != CONST_INT
            || mode == GET_MODE (x)
            || (GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (x))
+               /* On a big endian machine if the value spans more than
+                  one register then this register holds the high part of
+                  it and we can't use it.
+
+                  ??? We should also compare with the high part of the
+                  value.  */
+               && !(WORDS_BIG_ENDIAN
+                    && HARD_REGNO_NREGS (regno, GET_MODE (x)) > 1)
                && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
                                          GET_MODE_BITSIZE (GET_MODE (x))))))
       return 1;