OSDN Git Service

* implicit-zee.c: New file.
[pf3gnuchains/gcc-fork.git] / gcc / rtlhooks.c
index 432b286..a64c067 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic hooks for the RTL middle-end.
-   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -141,7 +141,7 @@ gen_lowpart_if_possible (enum machine_mode mode, rtx x)
     {
       /* This is the only other case we handle.  */
       int offset = 0;
-      rtx new;
+      rtx new_rtx;
 
       if (WORDS_BIG_ENDIAN)
        offset = (MAX (GET_MODE_SIZE (GET_MODE (x)), UNITS_PER_WORD)
@@ -152,11 +152,12 @@ gen_lowpart_if_possible (enum machine_mode mode, rtx x)
        offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode))
                   - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x))));
 
-      new = adjust_address_nv (x, mode, offset);
-      if (! memory_address_p (mode, XEXP (new, 0)))
+      new_rtx = adjust_address_nv (x, mode, offset);
+      if (! memory_address_addr_space_p (mode, XEXP (new_rtx, 0),
+                                        MEM_ADDR_SPACE (x)))
        return 0;
 
-      return new;
+      return new_rtx;
     }
   else if (mode != GET_MODE (x) && GET_MODE (x) != VOIDmode
           && validate_subreg (mode, GET_MODE (x), x,