+2003-12-24 Roger Sayle <roger@eyesopen.com>
+
+ Backport from mainline:
+
+ 2003-09-18 Mark Mitchell <mark@codesourcery.com>
+ * explow.c (convert_memory_address): Define even when
+ POINTERS_EXTEND_UNSIGNED is not defined. Do nothing if the address
+ is already in the right mode.
+
2003-12-23 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/13475
Backport from mainline:
2003-06-19 Aldy Hernandez <aldyh@redhat.com>
- * expr.c (const_vector_from_tree): Initialize remaining elements
- to 0.
+ * expr.c (const_vector_from_tree): Initialize remaining
+ elements to 0.
2003-12-23 Kazu Hirata <kazu@cs.umass.edu>
return x;
}
-#ifdef POINTERS_EXTEND_UNSIGNED
-
/* Given X, a memory address in ptr_mode, convert it to an address
in Pmode, or vice versa (TO_MODE says which way). We take advantage of
the fact that pointers are not allowed to overflow by commuting arithmetic
rtx
convert_memory_address (to_mode, x)
- enum machine_mode to_mode;
+ enum machine_mode to_mode ATTRIBUTE_UNUSED;
rtx x;
{
- enum machine_mode from_mode = to_mode == ptr_mode ? Pmode : ptr_mode;
+#ifndef POINTERS_EXTEND_UNSIGNED
+ return x;
+#else /* defined(POINTERS_EXTEND_UNSIGNED) */
+ enum machine_mode from_mode;
rtx temp;
enum rtx_code code;
+ /* If X already has the right mode, just return it. */
+ if (GET_MODE (x) == to_mode)
+ return x;
+
+ from_mode = to_mode == ptr_mode ? Pmode : ptr_mode;
+
/* Here we handle some special cases. If none of them apply, fall through
to the default case. */
switch (GET_CODE (x))
return convert_modes (to_mode, from_mode,
x, POINTERS_EXTEND_UNSIGNED);
+#endif /* defined(POINTERS_EXTEND_UNSIGNED) */
}
-#endif
/* Given a memory address or facsimile X, construct a new address,
currently equivalent, that is stable: future stores won't change it.